Fix crash when testSolanaLockup is executed for the first time

We forgot to initialize the big.Int.
This commit is contained in:
Leo 2021-01-19 17:03:48 +01:00
parent eeb560cb5c
commit d0d00f4972
1 changed files with 1 additions and 0 deletions

View File

@ -79,6 +79,7 @@ func testSolanaLockup(t *testing.T, ctx context.Context, ec *ethclient.Client, c
// Store balance of wrapped destination token
beforeErc20, err := token.BalanceOf(nil, devnet.GanacheClientDefaultAccountAddress)
if err != nil {
beforeErc20 = new(big.Int)
t.Log(err) // account may not yet exist, defaults to 0
}
t.Logf("ERC20 balance: %v", beforeErc20)