Skip to content

Commit

Permalink
Making some prompts optional
Browse files Browse the repository at this point in the history
  • Loading branch information
aaroncox committed Feb 8, 2024
1 parent 590d420 commit 6badb5c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"@types/node": "^18.7.18",
"@typescript-eslint/eslint-plugin": "^5.20.0",
"@typescript-eslint/parser": "^5.20.0",
"@wharfkit/session": "^1.2.7",
"@wharfkit/session": "^1.2.8",
"chai": "^4.3.4",
"eslint": "^8.13.0",
"eslint-config-prettier": "^8.1.0",
Expand Down
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class WalletPluginCloudWallet extends AbstractWalletPlugin implements Wal
*/
readonly config: WalletPluginConfig = {
// Should the user interface display a chain selector?
requiresChainSelect: true,
requiresChainSelect: false,
// Should the user interface display a permission selector?
requiresPermissionSelect: false,
// The blockchains this WalletPlugin supports
Expand Down Expand Up @@ -215,6 +215,7 @@ export class WalletPluginCloudWallet extends AbstractWalletPlugin implements Wal
promptPromise = context.ui.prompt({
title: 'Sign',
body: `Please complete the transaction using the Cloud Wallet popup window.`,
optional: true,
elements: [
{
type: 'countdown',
Expand All @@ -240,6 +241,7 @@ export class WalletPluginCloudWallet extends AbstractWalletPlugin implements Wal
() => {
// Clear the automatic timeout once the race resolves
clearTimeout(timer)
promptPromise.cancel()
}
)

Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -600,10 +600,10 @@
bn.js "^4.11.9"
tslib "^2.1.0"

"@wharfkit/session@^1.2.7":
version "1.2.7"
resolved "https://registry.yarnpkg.com/@wharfkit/session/-/session-1.2.7.tgz#8ff802d311038058d0cd5f65abcb1a85725bd18f"
integrity sha512-EP6uszhUlC90UAHDg+ZoXJid4z+d+iXPgOcMlWfNivq6XtyYXU+uDO9nyuZ9aiGezUs0dcnWuXsB8SM8vuR2Nw==
"@wharfkit/session@^1.2.8":
version "1.2.8"
resolved "https://registry.yarnpkg.com/@wharfkit/session/-/session-1.2.8.tgz#84de7a2343df4a45600af6e1e3fe294785da295f"
integrity sha512-F1oC+4rqCDbt84eKI0Vd2ahhR05Zi2FefqD14PLOo8sj1s5oR5uq7Zc9orSmprkkTqnYFAh9QOck+CWe+xR+8A==
dependencies:
"@wharfkit/abicache" "^1.2.1"
"@wharfkit/account" "^1.0.0"
Expand Down

0 comments on commit 6badb5c

Please sign in to comment.