@@ -331,11 +331,11 @@ func (suite *KeeperTestSuite) TestMsgServer_DepositBasic() {
331
331
// Check that the account has been updated
332
332
updatedAccount , _ := suite .App .ConfidentialTransfersKeeper .GetAccount (suite .Ctx , testAddr .String (), DefaultTestDenom )
333
333
334
- oldPendingBalancePlaintext = newPendingBalancePlaintext
334
+ oldPendingBalancePlaintext = oldPendingBalancePlaintext . Set ( newPendingBalancePlaintext )
335
335
newPendingBalancePlaintext , _ , _ , _ = updatedAccount .GetPendingBalancePlaintext (teg , keyPair )
336
336
suite .Require ().Equal (
337
- new (big.Int ).Add (oldPendingBalancePlaintext , big .NewInt (int64 (depositStruct .Amount ))). String () ,
338
- newPendingBalancePlaintext . String () ,
337
+ new (big.Int ).Add (oldPendingBalancePlaintext , big .NewInt (int64 (depositStruct .Amount ))),
338
+ newPendingBalancePlaintext ,
339
339
"Pending balances should have increased by the deposit amount" )
340
340
341
341
// Check that the amount in the bank module are changed correctly.
@@ -501,7 +501,7 @@ func (suite *KeeperTestSuite) TestMsgServer_WithdrawHappyPath() {
501
501
oldBalanceDecrypted , _ := teg .DecryptLargeNumber (keyPair .PrivateKey , initialState .AvailableBalance , elgamal .MaxBits32 )
502
502
newBalanceDecrypted , _ := teg .DecryptLargeNumber (keyPair .PrivateKey , account .AvailableBalance , elgamal .MaxBits32 )
503
503
newTotal := new (big.Int ).Sub (oldBalanceDecrypted , withdrawAmount )
504
- suite .Require ().Equal (newTotal . String () , newBalanceDecrypted . String () )
504
+ suite .Require ().Equal (newTotal , newBalanceDecrypted )
505
505
506
506
// Check that the DecryptableAvailableBalances were updated correctly
507
507
suite .Require ().Equal (req .DecryptableBalance , account .DecryptableAvailableBalance )
@@ -1029,14 +1029,14 @@ func (suite *KeeperTestSuite) TestMsgServer_TransferHappyPath() {
1029
1029
transferAmountBigInt := new (big.Int ).SetUint64 (transferAmount )
1030
1030
senderOldBalanceDecrypted , _ := teg .DecryptLargeNumber (senderKeypair .PrivateKey , initialSenderState .AvailableBalance , elgamal .MaxBits32 )
1031
1031
senderNewBalanceDecrypted , _ := teg .DecryptLargeNumber (senderKeypair .PrivateKey , senderAccountState .AvailableBalance , elgamal .MaxBits32 )
1032
- suite .Require ().Equal (new (big.Int ).Sub (senderOldBalanceDecrypted , transferAmountBigInt ). String () , senderNewBalanceDecrypted . String () , "AvailableBalance of sender should be decreased" )
1032
+ suite .Require ().Equal (new (big.Int ).Sub (senderOldBalanceDecrypted , transferAmountBigInt ), senderNewBalanceDecrypted , "AvailableBalance of sender should be decreased" )
1033
1033
1034
1034
// Verify that the DecryptableAvailableBalances were updated as well and that they match the available balances.
1035
1035
senderAesKey , _ := encryption .GetAESKey (* senderPk , DefaultTestDenom )
1036
1036
senderOldDecryptableBalanceDecrypted , _ := encryption .DecryptAESGCM (initialSenderState .DecryptableAvailableBalance , senderAesKey )
1037
1037
senderNewDecryptableBalanceDecrypted , _ := encryption .DecryptAESGCM (senderAccountState .DecryptableAvailableBalance , senderAesKey )
1038
- suite .Require ().Equal (new (big.Int ).Sub (senderOldDecryptableBalanceDecrypted , transferAmountBigInt ). String () , senderNewDecryptableBalanceDecrypted . String () )
1039
- suite .Require ().Equal (senderNewBalanceDecrypted . String () , senderNewDecryptableBalanceDecrypted . String () )
1038
+ suite .Require ().Equal (new (big.Int ).Sub (senderOldDecryptableBalanceDecrypted , transferAmountBigInt ), senderNewDecryptableBalanceDecrypted )
1039
+ suite .Require ().Equal (senderNewBalanceDecrypted , senderNewDecryptableBalanceDecrypted )
1040
1040
1041
1041
// On the other hand, available balances of the recipient account should not have been altered
1042
1042
recipientAccountState , _ := suite .App .ConfidentialTransfersKeeper .GetAccount (suite .Ctx , recipientAddr .String (), DefaultTestDenom )
0 commit comments