Skip to content

Commit

Permalink
fix: using sellram as test transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
dafuga committed Aug 13, 2024
1 parent 1e1d996 commit 653b04a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ It contains:
- A Metamask Snap that can be installed to provide the ability to interact with Antelope blockchains (at `packages/snap`)
- A simple Svelte Kit application that demonstrates how to use the Metamask Snap (at `packages/site`)

## Snaps is pre-release software
## Prerequisites

To interact with this Snap, you will need to install [MetaMask Flask](https://metamask.io/flask/),
a canary distribution for developers that provides access to upcoming features.
a canary distribution for developers that provides access to upcoming features. You will also need to disable the regular MetaMask extension as having it enabled could interfere with the Flask version.

## Getting Started

Expand Down
16 changes: 9 additions & 7 deletions packages/site/src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -66,24 +66,26 @@
async function test() {
if ($session) {
const action = {
account: 'eosio.token',
name: 'transfer',
account: 'eosio',
name: 'sellram',
authorization: [
{
actor: $session.permissionLevel.actor,
permission: $session.permissionLevel.permission
}
],
data: {
from: $session.permissionLevel.actor,
to: 'teamgreymass',
quantity: '0.0001 EOS',
memo: 'test with metamask'
account: $session.permissionLevel.actor,
bytes: 10
}
};
$session.transact({
const response = await $session.transact({
actions: [action]
});
alert(
`Transaction successfully executed. Transaction ID: ${response.resolved?.transaction.id}`
);
}
}
</script>
Expand Down

0 comments on commit 653b04a

Please sign in to comment.