Skip to content

Commit c4cde71

Browse files
author
Eason Smith
committed
add typeurl MsgWithdrawDelegatorReward
1 parent c1ab9e5 commit c4cde71

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

examples/stake-tokens/hooks/useTx.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { useToast, type CustomToast } from './useToast';
66
import { assetLists } from '@chain-registry/v2';
77
import { toEncoders, toConverters } from '@interchainjs/cosmos/utils'
88
import { MsgDelegate, MsgUndelegate, MsgBeginRedelegate } from 'interchainjs/cosmos/staking/v1beta1/tx'
9+
import { MsgWithdrawDelegatorReward } from 'interchainjs/cosmos/distribution/v1beta1/tx'
910

1011
const txRaw = cosmos.tx.v1beta1.TxRaw;
1112

@@ -61,8 +62,8 @@ export const useTx = (chainName: string) => {
6162
gas: '800000'
6263
}
6364
client = await getSigningClient();
64-
client.addEncoders(toEncoders(MsgDelegate, MsgUndelegate, MsgBeginRedelegate))
65-
client.addConverters(toConverters(MsgDelegate, MsgUndelegate, MsgBeginRedelegate))
65+
client.addEncoders(toEncoders(MsgDelegate, MsgUndelegate, MsgBeginRedelegate, MsgWithdrawDelegatorReward))
66+
client.addConverters(toConverters(MsgDelegate, MsgUndelegate, MsgBeginRedelegate, MsgWithdrawDelegatorReward))
6667
signed = await client.sign(address, msgs, fee, '');
6768
} catch (e: any) {
6869
console.error(e);

0 commit comments

Comments
 (0)