File tree Expand file tree Collapse file tree 2 files changed +28
-2
lines changed
Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -48,8 +48,6 @@ export class FbSigner {
4848 if ( tx . status == TransactionStatus . BLOCKED || tx . status == TransactionStatus . FAILED || tx . status == TransactionStatus . REJECTED || tx . status == TransactionStatus . CANCELLED ) {
4949 throw Error ( `Fireblocks signer: the transaction has been ${ tx . status } ` ) ;
5050 }
51- setTimeout ( ( ) => {
52- } , 4000 ) ;
5351 tx = await this . fireblocks . getTransactionById ( fbTx . id ) ;
5452 }
5553
Original file line number Diff line number Diff line change @@ -101,6 +101,34 @@ export class AtomService extends Service {
101101 }
102102 }
103103
104+ /**
105+ * Craft atom redelegate transaction
106+ * @param pubkey wallet pubkey, this is different from the wallet address
107+ * @param validatorSourceAddress validator address of the current delegation
108+ * @param validatorDestinationAddress validator address to which the delegation will be moved
109+ * @param amountAtom how many tokens to redelegate in ATOM
110+ */
111+ async craftRedelegateTx (
112+ pubkey : string ,
113+ validatorSourceAddress : string ,
114+ validatorDestinationAddress : string ,
115+ amountAtom ?: number ,
116+ ) : Promise < AtomTx > {
117+ try {
118+ const { data } = await api . post < AtomTx > (
119+ `/v1/atom/transaction/redelegate` ,
120+ {
121+ pubkey : pubkey ,
122+ validator_source : validatorSourceAddress ,
123+ validator_destination : validatorDestinationAddress ,
124+ amount_uatom : amountAtom ? this . atomToUatom ( amountAtom . toString ( ) ) : undefined ,
125+ } ) ;
126+ return data ;
127+ } catch ( err : any ) {
128+ throw new Error ( err ) ;
129+ }
130+ }
131+
104132 /**
105133 * Sign transaction with given integration
106134 * @param integration custody solution to sign with
You can’t perform that action at this time.
0 commit comments