Skip to content

Commit

Permalink
feature(wallet-mobile): new tx review for ctalyst
Browse files Browse the repository at this point in the history
  • Loading branch information
banklesss committed Oct 17, 2024
1 parent 70e3550 commit 195f63b
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions apps/wallet-mobile/src/yoroi-wallets/hooks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,12 @@ export const useVotingRegTx = (
catalystKeyHex,
supportsCIP36,
addressMode,
}: {wallet: YoroiWallet; catalystKeyHex: string | null; supportsCIP36: boolean; addressMode: Wallet.AddressMode},
}: {wallet: YoroiWallet; catalystKeyHex: string; supportsCIP36: boolean; addressMode: Wallet.AddressMode},
options?: UseQueryOptions<
VotingRegTxAndEncryptedKey | undefined,
VotingRegTxAndEncryptedKey,
Error,
VotingRegTxAndEncryptedKey,
[string | null, string, 'voting-reg-tx', string]
[string, string, 'voting-reg-tx', string]
>,
) => {
const query = useQuery({
Expand All @@ -243,10 +243,7 @@ export const useVotingRegTx = (
cacheTime: 0,
suspense: true,
queryKey: [catalystKeyHex, wallet.id, 'voting-reg-tx', JSON.stringify({supportsCIP36})],
queryFn: async () => {
if (catalystKeyHex === null) return
return wallet.createVotingRegTx({catalystKeyHex, supportsCIP36, addressMode})
},
queryFn: () => wallet.createVotingRegTx({catalystKeyHex, supportsCIP36, addressMode}),
})

if (!query.data) throw new Error('invalid state')
Expand Down

0 comments on commit 195f63b

Please sign in to comment.