diff options
author | Sebastian <sebasjm@gmail.com> | 2022-10-27 16:06:41 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-10-27 16:06:41 -0300 |
commit | aa6227b2b858d48272129c96fcf3d7fae39bba30 (patch) | |
tree | 6b8d71813fb00236815cecdf45688972b4c01389 /packages/taler-wallet-webextension/src/wallet/AddAccount/state.ts | |
parent | 06ac43b8920fe3154a5c24a18711c9afb2ce9964 (diff) | |
download | wallet-core-aa6227b2b858d48272129c96fcf3d7fae39bba30.tar.xz |
showing error field when there is not account yet
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/AddAccount/state.ts')
-rw-r--r-- | packages/taler-wallet-webextension/src/wallet/AddAccount/state.ts | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/AddAccount/state.ts b/packages/taler-wallet-webextension/src/wallet/AddAccount/state.ts index a9e8dfb30..6c113d732 100644 --- a/packages/taler-wallet-webextension/src/wallet/AddAccount/state.ts +++ b/packages/taler-wallet-webextension/src/wallet/AddAccount/state.ts @@ -67,15 +67,11 @@ export function useComponentState( } const paytoUriError = - payto === "" - ? undefined - : !uri - ? "the uri is not ok" - : found - ? "that account is already present" - : undefined; + found + ? "that account is already present" + : undefined; - const unableToAdd = !type || !alias || paytoUriError; + const unableToAdd = !type || !alias || !!paytoUriError || !uri; return { status: "ready", |