From 653b04ae0f3ff6bf12af2dede7306a45e18e59c5 Mon Sep 17 00:00:00 2001 From: dafuga Date: Mon, 12 Aug 2024 15:36:05 -0700 Subject: [PATCH] fix: using sellram as test transaction --- README.md | 4 ++-- packages/site/src/routes/+page.svelte | 16 +++++++++------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 226e917..7444ecf 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/packages/site/src/routes/+page.svelte b/packages/site/src/routes/+page.svelte index b8ec8d7..905b5ab 100644 --- a/packages/site/src/routes/+page.svelte +++ b/packages/site/src/routes/+page.svelte @@ -66,8 +66,8 @@ async function test() { if ($session) { const action = { - account: 'eosio.token', - name: 'transfer', + account: 'eosio', + name: 'sellram', authorization: [ { actor: $session.permissionLevel.actor, @@ -75,15 +75,17 @@ } ], 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}` + ); } }