Skip to content

Commit

Permalink
add transaction count to demo page
Browse files Browse the repository at this point in the history
  • Loading branch information
0xNe0x1 committed Sep 29, 2024
1 parent 313c03c commit 2f86203
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 11 deletions.
18 changes: 17 additions & 1 deletion demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

window._debug(`window?.WorldApp: ${window?.WorldApp ? JSON.stringify(window?.WorldApp) : undefined}`)

window._debug(`v29`)
window._debug(`v30`)

});

Expand Down Expand Up @@ -1512,6 +1512,22 @@ <h5 class="px-4">Sign message</h5>
</div>
</div>

<div class="d-block d-md-inline-block p-2 col-12 col-md-4">
<div class="px-0 py-4 rounded-lg bg-white border">
<div class="col px-0">
<div class="overflow-auto" style="height: 120px;">
<h5 class="px-4">Transaction count</h5>
<div class="px-4">
<div class="text-secondary ">Gets the transaction count for the connected wallet.</div>
</div>
</div>
<div class="px-4 pt-3">
<button class='btn btn-primary' onClick='window.wallet.transactionCount().then((number)=>{window._debug(`Transaction Count: ${number.toString()}`)})'>Try it</button>
</div>
</div>
</div>
</div>

<div class="d-block d-md-inline-block p-2 col-12 col-md-4">
<div class="px-0 py-4 rounded-lg bg-white border">
<div class="col px-0">
Expand Down
3 changes: 1 addition & 2 deletions dist/esm/index.evm.js
Original file line number Diff line number Diff line change
Expand Up @@ -6653,11 +6653,10 @@ class Worldapp {
return new Promise((resolve, reject)=>{

MiniKit.subscribe(ResponseEvent.MiniAppSignMessage, async (payload) => {
window._debug(`PAYLOAD: ${JSON.stringify(payload)}`);
if (payload.status === "error") {
return reject()
} else {
return resolve()
return resolve(payload.signature)
}
});

Expand Down
3 changes: 1 addition & 2 deletions dist/esm/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions dist/umd/index.evm.js
Original file line number Diff line number Diff line change
Expand Up @@ -6657,11 +6657,10 @@
return new Promise((resolve, reject)=>{

MiniKit.subscribe(ResponseEvent.MiniAppSignMessage, async (payload) => {
window._debug(`PAYLOAD: ${JSON.stringify(payload)}`);
if (payload.status === "error") {
return reject()
} else {
return resolve()
return resolve(payload.signature)
}
});

Expand Down
3 changes: 1 addition & 2 deletions dist/umd/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions src/wallets/Worldapp.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2f86203

Please sign in to comment.