@@ -475,16 +475,16 @@ func TestNativeCoinAdapter(t *testing.T) {
475475 transferSig , r , s , v := g .BuildTransferWithAuthSig (t , from , to .Address , transferAmount , nil , nil , transferNonce ) // 0 - MAX_UINT_256
476476 // transfer by r,s,v
477477 {
478- balnaceFrom := g .BalanceOf (t , from .Address )
479- balnaceTo := g .BalanceOf (t , to .Address )
478+ balanceFrom := g .BalanceOf (t , from .Address )
479+ balanceTo := g .BalanceOf (t , to .Address )
480480
481481 receipt , err := g .ExpectedOk (
482482 g .TransferWithAuthorization (t , minter1 , from .Address , to .Address , transferAmount , nil , nil , transferNonce , v , r , s ),
483483 )
484484 require .NoError (t , err )
485485
486- require .True (t , new (big.Int ).Sub (balnaceFrom , transferAmount ).Cmp (g .BalanceOf (t , from .Address )) == 0 )
487- require .True (t , new (big.Int ).Add (balnaceTo , transferAmount ).Cmp (g .BalanceOf (t , to .Address )) == 0 )
486+ require .True (t , new (big.Int ).Sub (balanceFrom , transferAmount ).Cmp (g .BalanceOf (t , from .Address )) == 0 )
487+ require .True (t , new (big.Int ).Add (balanceTo , transferAmount ).Cmp (g .BalanceOf (t , to .Address )) == 0 )
488488
489489 // approval event
490490 approvalEvent := findEvent ("Transfer" , receipt .Logs )
@@ -541,14 +541,14 @@ func TestNativeCoinAdapter(t *testing.T) {
541541 validBefore := new (big.Int ).SetUint64 (block .Time () + 100 )
542542 transferSig , _ , _ , _ = g .BuildTransferWithAuthSig (t , from , to .Address , transferAmount , validAfter , validBefore , transferNonce )
543543
544- balnaceFrom := g .BalanceOf (t , from .Address )
545- balnaceTo := g .BalanceOf (t , to .Address )
544+ balanceFrom := g .BalanceOf (t , from .Address )
545+ balanceTo := g .BalanceOf (t , to .Address )
546546
547547 receipt , err := g .ExpectedOk (g .TransferWithAuthorization (t , minter1 , from .Address , to .Address , transferAmount , validAfter , validBefore , transferNonce , transferSig ))
548548 require .NoError (t , err )
549549
550- require .True (t , new (big.Int ).Sub (balnaceFrom , transferAmount ).Cmp (g .BalanceOf (t , from .Address )) == 0 )
551- require .True (t , new (big.Int ).Add (balnaceTo , transferAmount ).Cmp (g .BalanceOf (t , to .Address )) == 0 )
550+ require .True (t , new (big.Int ).Sub (balanceFrom , transferAmount ).Cmp (g .BalanceOf (t , from .Address )) == 0 )
551+ require .True (t , new (big.Int ).Add (balanceTo , transferAmount ).Cmp (g .BalanceOf (t , to .Address )) == 0 )
552552
553553 // transfer event
554554 transferEvent := findEvent ("Transfer" , receipt .Logs )
@@ -568,16 +568,16 @@ func TestNativeCoinAdapter(t *testing.T) {
568568 receiveSig , r , s , v := g .BuildReceiveWithAuthSig (t , from , to .Address , transferAmount , nil , nil , receiveNonce ) // 0 - MAX_UINT_256
569569 // receive by r,s,v
570570 {
571- balnaceFrom := g .BalanceOf (t , from .Address )
572- balnaceTo := g .BalanceOf (t , to .Address )
571+ balanceFrom := g .BalanceOf (t , from .Address )
572+ balanceTo := g .BalanceOf (t , to .Address )
573573
574574 receipt , err := g .ExpectedOk (
575575 g .ReceiveWithAuthorization (t , to , from .Address , transferAmount , nil , nil , receiveNonce , v , r , s ),
576576 )
577577 require .NoError (t , err )
578578
579- require .True (t , new (big.Int ).Sub (balnaceFrom , transferAmount ).Cmp (g .BalanceOf (t , from .Address )) == 0 )
580- expectedBalance := new (big.Int ).Sub (new (big.Int ).Add (balnaceTo , transferAmount ), calcGasCost (receipt ))
579+ require .True (t , new (big.Int ).Sub (balanceFrom , transferAmount ).Cmp (g .BalanceOf (t , from .Address )) == 0 )
580+ expectedBalance := new (big.Int ).Sub (new (big.Int ).Add (balanceTo , transferAmount ), calcGasCost (receipt ))
581581 require .True (t , expectedBalance .Cmp (g .BalanceOf (t , to .Address )) == 0 )
582582
583583 // approval event
@@ -651,16 +651,16 @@ func TestNativeCoinAdapter(t *testing.T) {
651651 validBefore := new (big.Int ).SetUint64 (block .Time () + 100 )
652652 receiveSig , _ , _ , _ = g .BuildReceiveWithAuthSig (t , from , to .Address , transferAmount , validAfter , validBefore , receiveNonce )
653653
654- balnaceFrom := g .BalanceOf (t , from .Address )
655- balnaceTo := g .BalanceOf (t , to .Address )
654+ balanceFrom := g .BalanceOf (t , from .Address )
655+ balanceTo := g .BalanceOf (t , to .Address )
656656
657657 receipt , err := g .ExpectedOk (
658658 g .ReceiveWithAuthorization (t , to , from .Address , transferAmount , validAfter , validBefore , receiveNonce , receiveSig ),
659659 )
660660 require .NoError (t , err )
661661
662- require .True (t , new (big.Int ).Sub (balnaceFrom , transferAmount ).Cmp (g .BalanceOf (t , from .Address )) == 0 )
663- expectedBalance := new (big.Int ).Sub (new (big.Int ).Add (balnaceTo , transferAmount ), calcGasCost (receipt ))
662+ require .True (t , new (big.Int ).Sub (balanceFrom , transferAmount ).Cmp (g .BalanceOf (t , from .Address )) == 0 )
663+ expectedBalance := new (big.Int ).Sub (new (big.Int ).Add (balanceTo , transferAmount ), calcGasCost (receipt ))
664664 require .True (t , expectedBalance .Cmp (g .BalanceOf (t , to .Address )) == 0 )
665665
666666 // transfer event
@@ -717,14 +717,14 @@ func TestNativeCoinAdapter(t *testing.T) {
717717
718718 // transfer
719719 {
720- balnaceFrom := g .BalanceOf (t , from .Address )
721- balnaceTo := g .BalanceOf (t , to .Address )
720+ balanceFrom := g .BalanceOf (t , from .Address )
721+ balanceTo := g .BalanceOf (t , to .Address )
722722
723723 receipt , err := g .ExpectedOk (g .TransferWithAuthorization (t , minter1 , from .Address , to .Address , transferAmount , nil , nil , expectedFailNonce , transferSig ))
724724 require .NoError (t , err )
725725
726- require .True (t , new (big.Int ).Sub (balnaceFrom , transferAmount ).Cmp (g .BalanceOf (t , from .Address )) == 0 )
727- require .True (t , new (big.Int ).Add (balnaceTo , transferAmount ).Cmp (g .BalanceOf (t , to .Address )) == 0 )
726+ require .True (t , new (big.Int ).Sub (balanceFrom , transferAmount ).Cmp (g .BalanceOf (t , from .Address )) == 0 )
727+ require .True (t , new (big.Int ).Add (balanceTo , transferAmount ).Cmp (g .BalanceOf (t , to .Address )) == 0 )
728728
729729 // transfer event
730730 transferEvent := findEvent ("Transfer" , receipt .Logs )
@@ -930,7 +930,7 @@ func TestNativeCoinAdapter_Blacklist(t *testing.T) {
930930 expectedRevertMsg ,
931931 )
932932 }
933- // onwer is blacklisted
933+ // owner is blacklisted
934934 {
935935 permitSig , _ , _ , _ := g .BuildPermitSig (t , spender , owner .Address , approveAmount , nil ) // deadline == MAX_UINT_256
936936
0 commit comments