Skip to content

Commit

Permalink
Fix comments and improve tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dzmitryhil committed Nov 20, 2023
1 parent 890001e commit e720402
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
3 changes: 0 additions & 3 deletions integration-tests/coreum/contract_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,6 @@ func TestSendFromXRPLToCoreumXRPLOriginatedTokenWithDifferentSendingPrecision(t
_, err = contractClient.SendXRPLToCoreumTransferEvidence(ctx, relayer.CoreumAddress, xrplToCoreumTransferEvidence)
if tt.wantIsAmountSentIsZeroAfterTruncationError {
require.True(t, coreum.IsAmountSentIsZeroAfterTruncationError(err), err)
return
}
if tt.wantIsMaximumBridgedAmountReachedError {
require.True(t, coreum.IsMaximumBridgedAmountReachedError(err), err)
Expand Down Expand Up @@ -1274,7 +1273,6 @@ func TestSendFromCoreumToXRPLXRPLOriginatedTokenWithDifferentSendingPrecision(t
_, err = contractClient.SendToXRPL(ctx, coreumSenderAddress, xrplRecipient.String(), sdk.NewCoin(registeredXRPLToken.CoreumDenom, tt.sendingAmount))
if tt.wantIsAmountSentIsZeroAfterTruncationError {
require.True(t, coreum.IsAmountSentIsZeroAfterTruncationError(err), err)
return
}
require.NoError(t, err)

Expand All @@ -1286,7 +1284,6 @@ func TestSendFromCoreumToXRPLXRPLOriginatedTokenWithDifferentSendingPrecision(t
if operationType != nil && operationType.Issuer == issuer && operationType.Currency == currency {
found = true
require.Equal(t, tt.wantReceivedAmount.String(), operationType.Amount.String())
break
}
}
require.True(t, found)
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/xrpl.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ func (c XRPLChain) SubmitTx(ctx context.Context, t *testing.T, tx rippledata.Tra
})
}

// GetAccountBalance returns account balance for the provides issuer and currency.
// GetAccountBalance returns account balance for the provided issuer and currency.
func (c XRPLChain) GetAccountBalance(ctx context.Context, t *testing.T, account, issuer rippledata.Account, currency rippledata.Currency) rippledata.Amount {
return c.GetAccountBalances(ctx, t, account)[fmt.Sprintf("%s/%s", currency.String(), issuer.String())]
}
Expand Down
2 changes: 1 addition & 1 deletion relayer/processes/xrpl_tx_submitter.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ func (s *XRPLTxSubmitter) buildXRPLTxFromOperation(operation coreum.Operation) (
case isCoreumToXRPLTransfer(operation):
return BuildCoreumToXRPLTransferPaymentTxForMultiSigning(s.cfg.BridgeAccount, operation)
default:
return nil, errors.Errorf("failed to process operation, unable to determin operation type, operation:%+v", operation)
return nil, errors.Errorf("failed to process operation, unable to determine operation type, operation:%+v", operation)
}
}

Expand Down

0 comments on commit e720402

Please sign in to comment.