File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -245,5 +245,8 @@ export class Canton extends BaseCoin {
245245 if ( params . txRequestId ) {
246246 intent . txRequestId = params . txRequestId ;
247247 }
248+ if ( params . contractId ) {
249+ intent . contractId = params . contractId ;
250+ }
248251 }
249252}
Original file line number Diff line number Diff line change @@ -141,6 +141,10 @@ export abstract class MpcUtils {
141141 assert ( params . txRequestId , `'txRequestId' is required parameter for ${ params . intentType } intent` ) ;
142142 }
143143
144+ if ( params . intentType === 'transferOfferWithdrawn' && baseCoin . getFamily ( ) === 'canton' ) {
145+ assert ( params . contractId , `'contractId' is required parameter for ${ params . intentType } intent` ) ;
146+ }
147+
144148 if (
145149 ! [
146150 'acceleration' ,
@@ -150,6 +154,7 @@ export abstract class MpcUtils {
150154 'customTx' ,
151155 'transferAccept' ,
152156 'transferReject' ,
157+ 'transferOfferWithdrawn' ,
153158 ] . includes ( params . intentType )
154159 ) {
155160 assert ( params . recipients , `'recipients' is a required parameter for ${ params . intentType } intent` ) ;
Original file line number Diff line number Diff line change @@ -270,6 +270,7 @@ export interface PrebuildTransactionWithIntentOptions extends IntentOptionsBase
270270 } ;
271271 txRequestId ?: string ;
272272 isTestTransaction ?: boolean ;
273+ contractId ?: string ;
273274}
274275export interface IntentRecipient {
275276 address : {
@@ -340,6 +341,7 @@ export interface PopulatedIntent extends PopulatedIntentBase {
340341 aptosCustomTransactionParams ?: aptosCustomTransactionParams ;
341342 txRequestId ?: string ;
342343 isTestTransaction ?: boolean ;
344+ contractId ?: string ;
343345}
344346
345347export type TxRequestState =
Original file line number Diff line number Diff line change @@ -218,6 +218,7 @@ export interface PrebuildTransactionOptions {
218218 } ;
219219 txRequestId ?: string ;
220220 isTestTransaction ?: boolean ;
221+ contractId ?: string ;
221222}
222223
223224export interface PrebuildAndSignTransactionOptions extends PrebuildTransactionOptions , WalletSignTransactionOptions {
Original file line number Diff line number Diff line change @@ -3714,6 +3714,19 @@ export class Wallet implements IWallet {
37143714 ) ;
37153715 break ;
37163716 }
3717+ case 'transferOfferWithdrawn' : {
3718+ txRequest = await this . tssUtils ! . prebuildTxWithIntent (
3719+ {
3720+ reqId,
3721+ intentType : 'transferOfferWithdrawn' ,
3722+ contractId : params . contractId ,
3723+ sequenceId : params . contractId ,
3724+ } ,
3725+ apiVersion ,
3726+ params . preview
3727+ ) ;
3728+ break ;
3729+ }
37173730 case 'customTx' :
37183731 txRequest = await this . tssUtils ! . prebuildTxWithIntent (
37193732 {
You can’t perform that action at this time.
0 commit comments