diff --git a/CODEOWNERS b/CODEOWNERS index abc965ec34..61c0edb3d2 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -52,6 +52,7 @@ /modules/sdk-coin-atom/ @BitGo/ethalt-team /modules/sdk-coin-avaxc/ @BitGo/ethalt-team /modules/sdk-coin-avaxp/ @BitGo/ethalt-team +/modules/sdk-coin-bera/ @BitGo/ethalt-team /modules/sdk-coin-bsc/ @BitGo/ethalt-team /modules/sdk-coin-coredao/ @BitGo/ethalt-team /modules/sdk-coin-cspr/ @BitGo/ethalt-team diff --git a/modules/abstract-eth/src/abstractEthLikeNewCoins.ts b/modules/abstract-eth/src/abstractEthLikeNewCoins.ts index 3e2d3ba3f7..0bda6ec0d6 100644 --- a/modules/abstract-eth/src/abstractEthLikeNewCoins.ts +++ b/modules/abstract-eth/src/abstractEthLikeNewCoins.ts @@ -2281,7 +2281,9 @@ export abstract class AbstractEthLikeNewCoins extends AbstractEthLikeCoin { throw new Error(`tx cannot be both a batch and hop transaction`); } if (txPrebuild.recipients.length !== 1) { - throw new Error(`txPrebuild should only have 1 recipient but ${txPrebuild.recipients.length} found`); + throw new Error( + `${this.getChain()} doesn't support sending to more then 1 destination address within a single transaction. Try again, using only a single recipient.` + ); } if (txParams.hop && txPrebuild.hopTransaction) { // Check recipient amount for hop transaction diff --git a/modules/abstract-eth/test/unit/coin.ts b/modules/abstract-eth/test/unit/coin.ts index 48cc29e8a0..e2ead2450c 100644 --- a/modules/abstract-eth/test/unit/coin.ts +++ b/modules/abstract-eth/test/unit/coin.ts @@ -348,7 +348,9 @@ export function runTransactionVerificationTests(coinName: string, bitgo: TestBit await basecoin .verifyTransaction({ txParams, txPrebuild, wallet, verification }) - .should.be.rejectedWith('txPrebuild should only have 1 recipient but 2 found'); + .should.be.rejectedWith( + `${coinTest} doesn't support sending to more then 1 destination address within a single transaction. Try again, using only a single recipient.` + ); }); it('should reject a hop txPrebuild that does not send to its hop address', async () => { diff --git a/modules/sdk-coin-arbeth/test/unit/arbeth.ts b/modules/sdk-coin-arbeth/test/unit/arbeth.ts index 4336f8b7ea..68d1d77a93 100644 --- a/modules/sdk-coin-arbeth/test/unit/arbeth.ts +++ b/modules/sdk-coin-arbeth/test/unit/arbeth.ts @@ -402,7 +402,9 @@ describe('Arbitrum', function () { await basecoin .verifyTransaction({ txParams, txPrebuild, wallet, verification }) - .should.be.rejectedWith('txPrebuild should only have 1 recipient but 2 found'); + .should.be.rejectedWith( + `tarbeth doesn't support sending to more then 1 destination address within a single transaction. Try again, using only a single recipient.` + ); }); it('should reject a hop txPrebuild that does not send to its hop address', async function () { diff --git a/modules/sdk-coin-avaxc/src/avaxc.ts b/modules/sdk-coin-avaxc/src/avaxc.ts index 77ebe26837..aa1c92b704 100644 --- a/modules/sdk-coin-avaxc/src/avaxc.ts +++ b/modules/sdk-coin-avaxc/src/avaxc.ts @@ -171,7 +171,9 @@ export class AvaxC extends AbstractEthLikeNewCoins { throw new Error(`tx cannot be both a batch and hop transaction`); } if (txPrebuild.recipients.length !== 1) { - throw new Error(`txPrebuild should only have 1 recipient but ${txPrebuild.recipients.length} found`); + throw new Error( + `${this.getChain()} doesn't support sending to more then 1 destination address within a single transaction. Try again, using only a single recipient.` + ); } if (txParams.hop && txPrebuild.hopTransaction) { // Check recipient amount for hop transaction diff --git a/modules/sdk-coin-avaxc/test/unit/avaxc.ts b/modules/sdk-coin-avaxc/test/unit/avaxc.ts index 6a06801e73..dcb5f35275 100644 --- a/modules/sdk-coin-avaxc/test/unit/avaxc.ts +++ b/modules/sdk-coin-avaxc/test/unit/avaxc.ts @@ -610,7 +610,9 @@ describe('Avalanche C-Chain', function () { await tavaxCoin .verifyTransaction({ txParams, txPrebuild, wallet, verification }) - .should.be.rejectedWith('txPrebuild should only have 1 recipient but 2 found'); + .should.be.rejectedWith( + `tavaxc doesn't support sending to more then 1 destination address within a single transaction. Try again, using only a single recipient.` + ); }); it('should reject a hop txPrebuild that does not send to its hop address', async function () { diff --git a/modules/sdk-coin-bera/test/unit/bera.ts b/modules/sdk-coin-bera/test/unit/bera.ts index cf6499d80f..f399df82a7 100644 --- a/modules/sdk-coin-bera/test/unit/bera.ts +++ b/modules/sdk-coin-bera/test/unit/bera.ts @@ -302,7 +302,9 @@ describe('Bera', function () { await basecoin .verifyTransaction({ txParams, txPrebuild, wallet, verification }) - .should.be.rejectedWith('txPrebuild should only have 1 recipient but 2 found'); + .should.be.rejectedWith( + `tbera doesn't support sending to more then 1 destination address within a single transaction. Try again, using only a single recipient.` + ); }); it('should reject a normal txPrebuild from the bitgo server with the wrong amount', async function () { diff --git a/modules/sdk-coin-eth/test/unit/eth.ts b/modules/sdk-coin-eth/test/unit/eth.ts index bc02e8e67d..1558fc5a57 100644 --- a/modules/sdk-coin-eth/test/unit/eth.ts +++ b/modules/sdk-coin-eth/test/unit/eth.ts @@ -411,7 +411,9 @@ describe('ETH:', function () { await coin .verifyTransaction({ txParams, txPrebuild: txPrebuild as any, wallet, verification }) - .should.be.rejectedWith('txPrebuild should only have 1 recipient but 2 found'); + .should.be.rejectedWith( + `teth doesn't support sending to more then 1 destination address within a single transaction. Try again, using only a single recipient.` + ); }); it('should reject a hop txPrebuild that does not send to its hop address', async function () { diff --git a/modules/sdk-coin-opeth/test/unit/opeth.ts b/modules/sdk-coin-opeth/test/unit/opeth.ts index c5e43a887d..e30ce2df84 100644 --- a/modules/sdk-coin-opeth/test/unit/opeth.ts +++ b/modules/sdk-coin-opeth/test/unit/opeth.ts @@ -398,7 +398,9 @@ describe('Optimism', function () { await basecoin .verifyTransaction({ txParams, txPrebuild, wallet, verification }) - .should.be.rejectedWith('txPrebuild should only have 1 recipient but 2 found'); + .should.be.rejectedWith( + `topeth doesn't support sending to more then 1 destination address within a single transaction. Try again, using only a single recipient.` + ); }); it('should reject a hop txPrebuild that does not send to its hop address', async function () { diff --git a/modules/sdk-coin-polygon/test/unit/polygon.ts b/modules/sdk-coin-polygon/test/unit/polygon.ts index 1cf0e5b2ac..1d4c0d6d30 100644 --- a/modules/sdk-coin-polygon/test/unit/polygon.ts +++ b/modules/sdk-coin-polygon/test/unit/polygon.ts @@ -387,9 +387,10 @@ describe('Polygon', function () { await basecoin .verifyTransaction({ txParams, txPrebuild, wallet, verification }) - .should.be.rejectedWith('txPrebuild should only have 1 recipient but 2 found'); + .should.be.rejectedWith( + `tpolygon doesn't support sending to more then 1 destination address within a single transaction. Try again, using only a single recipient.` + ); }); - it('should reject a hop txPrebuild that does not send to its hop address', async function () { const wallet = new Wallet(bitgo, basecoin, {}); diff --git a/modules/sdk-coin-zketh/test/unit/zketh.ts b/modules/sdk-coin-zketh/test/unit/zketh.ts index a3e2eb5bcb..f3c592fcdc 100644 --- a/modules/sdk-coin-zketh/test/unit/zketh.ts +++ b/modules/sdk-coin-zketh/test/unit/zketh.ts @@ -400,7 +400,9 @@ describe('zkSync', function () { await basecoin .verifyTransaction({ txParams, txPrebuild, wallet, verification }) - .should.be.rejectedWith('txPrebuild should only have 1 recipient but 2 found'); + .should.be.rejectedWith( + `tzketh doesn't support sending to more then 1 destination address within a single transaction. Try again, using only a single recipient.` + ); }); it('should reject a hop txPrebuild that does not send to its hop address', async function () {