Skip to content

Commit

Permalink
fix: add coin.TRANSFER capability
Browse files Browse the repository at this point in the history
  • Loading branch information
hcote committed Oct 11, 2024
1 parent df5f02d commit 67eea57
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,15 @@ function App() {
keys: [receiverPublicKey],
pred: "keys-all",
})
.addSigner(senderPublicKey, (withCapability) => [withCapability("coin.GAS")])
.addSigner(senderPublicKey, (withCapability) => [
withCapability("coin.GAS"),
withCapability(
"coin.TRANSFER",
userMetadata.publicAddress,
toAccount,
amount
),
])
.setMeta({ chainId, senderAccount: userMetadata.publicAddress })
.setNetworkId(networkId)
.createTransaction();
Expand Down

0 comments on commit 67eea57

Please sign in to comment.