Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions modules/bitgo/test/v2/unit/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3158,6 +3158,28 @@ describe('V2 Wallet:', function () {
intent.intentType.should.equal('acceleration');
});

it('populate intent should return valid coredao acceleration intent', async function () {
const mpcUtils = new ECDSAUtils.EcdsaUtils(bitgo, bitgo.coin('coredao'));

const feeOptions = {
maxFeePerGas: 3000000000,
maxPriorityFeePerGas: 2000000000,
};
const lowFeeTxid = '0x6ea07f9420f4676be6478ab1660eb92444a7c663e0e24bece929f715e882e0cf';

const intent = mpcUtils.populateIntent(bitgo.coin('coredao'), {
reqId,
intentType: 'acceleration',
lowFeeTxid,
feeOptions,
});

intent.should.have.property('recipients', undefined);
intent.feeOptions!.should.deepEqual(feeOptions);
intent.txid!.should.equal(lowFeeTxid);
intent.intentType.should.equal('acceleration');
});

it('populate intent should return valid eth acceleration intent for receive address', async function () {
const mpcUtils = new ECDSAUtils.EcdsaUtils(bitgo, bitgo.coin('hteth'));

Expand Down
2 changes: 1 addition & 1 deletion modules/sdk-core/src/bitgo/utils/mpcUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export abstract class MpcUtils {
isTestTransaction: params.isTestTransaction,
};

if (baseCoin.getFamily() === 'eth' || baseCoin.getFamily() === 'polygon' || baseCoin.getFamily() === 'bsc') {
if (['eth', 'polygon', 'bsc', 'coredao'].includes(baseCoin.getFamily())) {
switch (params.intentType) {
case 'payment':
case 'transferToken':
Expand Down