Skip to content

Commit

Permalink
feat: bittensor stake with remark (#1158)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisling-dev authored Jul 30, 2024
1 parent 30f3545 commit bf85aef
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apps/portal/src/domains/staking/subtensor/hooks/forms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,11 @@ export const useAddStakeForm = (account: Account, stake: Stake, delegate: string
])

const tx: SubmittableExtrinsic<any> = useMemo(
() => (api.tx as any)?.subtensorModule?.addStake?.(delegate, amount.decimalAmount?.planck ?? 0n),
() =>
api.tx.utility.batchAll([
(api.tx as any)?.subtensorModule?.addStake?.(delegate, amount.decimalAmount?.planck ?? 0n),
api.tx.system.remarkWithEvent(`talisman-bittensor`),
]),
[api.tx, delegate, amount.decimalAmount?.planck]
)
const extrinsic = useExtrinsic(tx)
Expand Down

0 comments on commit bf85aef

Please sign in to comment.