File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -3158,6 +3158,28 @@ describe('V2 Wallet:', function () {
31583158 intent . intentType . should . equal ( 'acceleration' ) ;
31593159 } ) ;
31603160
3161+ it ( 'populate intent should return valid coredao acceleration intent' , async function ( ) {
3162+ const mpcUtils = new ECDSAUtils . EcdsaUtils ( bitgo , bitgo . coin ( 'coredao' ) ) ;
3163+
3164+ const feeOptions = {
3165+ maxFeePerGas : 3000000000 ,
3166+ maxPriorityFeePerGas : 2000000000 ,
3167+ } ;
3168+ const lowFeeTxid = '0x6ea07f9420f4676be6478ab1660eb92444a7c663e0e24bece929f715e882e0cf' ;
3169+
3170+ const intent = mpcUtils . populateIntent ( bitgo . coin ( 'coredao' ) , {
3171+ reqId,
3172+ intentType : 'acceleration' ,
3173+ lowFeeTxid,
3174+ feeOptions,
3175+ } ) ;
3176+
3177+ intent . should . have . property ( 'recipients' , undefined ) ;
3178+ intent . feeOptions ! . should . deepEqual ( feeOptions ) ;
3179+ intent . txid ! . should . equal ( lowFeeTxid ) ;
3180+ intent . intentType . should . equal ( 'acceleration' ) ;
3181+ } ) ;
3182+
31613183 it ( 'populate intent should return valid eth acceleration intent for receive address' , async function ( ) {
31623184 const mpcUtils = new ECDSAUtils . EcdsaUtils ( bitgo , bitgo . coin ( 'hteth' ) ) ;
31633185
Original file line number Diff line number Diff line change @@ -191,7 +191,7 @@ export abstract class MpcUtils {
191191 isTestTransaction : params . isTestTransaction ,
192192 } ;
193193
194- if ( baseCoin . getFamily ( ) === 'eth' || baseCoin . getFamily ( ) === 'polygon' || baseCoin . getFamily ( ) === 'bsc' ) {
194+ if ( [ 'eth' , 'polygon' , 'bsc' , 'coredao' ] . includes ( baseCoin . getFamily ( ) ) ) {
195195 switch ( params . intentType ) {
196196 case 'payment' :
197197 case 'transferToken' :
You can’t perform that action at this time.
0 commit comments