From a185f07eee09ce017f28e7d61ec80301e2b7ce26 Mon Sep 17 00:00:00 2001 From: nikashitsa Date: Wed, 11 Sep 2024 10:30:27 +0200 Subject: [PATCH] feat: update cs-common --- lib/SolanaWallet.js | 2 +- package-lock.json | 8 ++++---- package.json | 2 +- test/wallet.test.js | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/SolanaWallet.js b/lib/SolanaWallet.js index 46a597a..1726294 100644 --- a/lib/SolanaWallet.js +++ b/lib/SolanaWallet.js @@ -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) ); } diff --git a/package-lock.json b/package-lock.json index e4cd1ce..d121d27 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,7 +21,7 @@ "sinon": "^17.0.0" }, "peerDependencies": { - "@coinspace/cs-common": "^1.1.2" + "@coinspace/cs-common": "^1.1.4" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -34,9 +34,9 @@ } }, "node_modules/@coinspace/cs-common": { - "version": "1.1.2", - "resolved": "https://npm.pkg.github.com/download/@coinspace/cs-common/1.1.2/62b56ed389eecad9edaf9afaf1e0e99b807e1c3c", - "integrity": "sha512-UijjJHKKWt8qjsmQ+aip3+OyYt1luGFpj+6IQSVnvi7WRuDka9E8iQzsiMulRsVdLohzy+KfEIMlWIoCOYZNRg==", + "version": "1.1.4", + "resolved": "https://npm.pkg.github.com/download/@coinspace/cs-common/1.1.4/894c33fb015e9a16f8590dbbedbde9061f581953", + "integrity": "sha512-KEKoEwn5c06imNYIAwhj0HHVwS5FSrQSYTnbvDDnVmtCCjg8k5AuinRFpdDW433JIVUV0uiQZxtM+spLDlDsAA==", "license": "MIT", "peer": true, "dependencies": { diff --git a/package.json b/package.json index 1086b81..8691132 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/test/wallet.test.js b/test/wallet.test.js index badcd8d..963a12b 100644 --- a/test/wallet.test.js +++ b/test/wallet.test.js @@ -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), }); }); @@ -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), }); });