Skip to content

Commit

Permalink
feat: update cs-common
Browse files Browse the repository at this point in the history
  • Loading branch information
nikashitsa committed Sep 11, 2024
1 parent aef2077 commit a185f07
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lib/SolanaWallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ export default class SolanaWallet extends CsWallet {
}
const minimumCoinBalance = await this.#getRent('coin');
if (this.#coinBalance < (fee + minimumCoinBalance)) {
throw new errors.InsufficientCoinForTokenTransactionError(
throw new errors.InsufficientCoinForTransactionFeeError(
new Amount(fee + minimumCoinBalance, this.platform.decimals)
);
}
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"micro-sol-signer": "^0.4.0"
},
"peerDependencies": {
"@coinspace/cs-common": "^1.1.2"
"@coinspace/cs-common": "^1.1.4"
},
"devDependencies": {
"eslint": "^8.56.0",
Expand Down
8 changes: 4 additions & 4 deletions test/wallet.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -645,8 +645,8 @@ describe('Solana Wallet', () => {
amount: new Amount(2_000000n, wallet.crypto.decimals),
});
}, {
name: 'InsufficientCoinForTokenTransactionError',
message: 'Insufficient funds for token transaction',
name: 'InsufficientCoinForTransactionFeeError',
message: 'Insufficient funds to pay the transaction fee',
amount: new Amount(895880n, wallet.platform.decimals),
});
});
Expand All @@ -667,8 +667,8 @@ describe('Solana Wallet', () => {
amount: new Amount(2_000000n, wallet.crypto.decimals),
});
}, {
name: 'InsufficientCoinForTokenTransactionError',
message: 'Insufficient funds for token transaction',
name: 'InsufficientCoinForTransactionFeeError',
message: 'Insufficient funds to pay the transaction fee',
amount: new Amount(2900360n, wallet.platform.decimals),
});
});
Expand Down

0 comments on commit a185f07

Please sign in to comment.