+
{#if $scanningForFullnodes}
{$_('layout.attempting_to_connect')}
diff --git a/src/components/layout/SplashScreen.svelte b/src/components/layout/SplashScreen.svelte
new file mode 100644
index 00000000..8a7d2ff4
--- /dev/null
+++ b/src/components/layout/SplashScreen.svelte
@@ -0,0 +1,36 @@
+
+
+
+
+{#if loading}
+
+
+
Carpe Libra
+
+{/if}
diff --git a/src/components/settings/AccountSettings.svelte b/src/components/settings/AccountSettings.svelte
index ada764b3..8b6cf373 100644
--- a/src/components/settings/AccountSettings.svelte
+++ b/src/components/settings/AccountSettings.svelte
@@ -5,7 +5,7 @@
import { raise_error } from '../../modules/carpeError'
import { notify_success } from '../../modules/carpeNotify'
import { responses } from '../../modules/debug'
- import { watchAccounts } from '../../modules/accounts'
+ import { watchAccounts, pendingAccounts } from '../../modules/accounts'
const removeAccounts = async () => {
resetSigningAccount()
@@ -14,6 +14,7 @@
responses.set(res)
notify_success('Accounts removed successfully')
watchAccounts.set([])
+ pendingAccounts.set([])
localStorage.removeItem('watchAccounts')
refreshAccounts()
})
diff --git a/src/components/wallet/AccountsList.svelte b/src/components/wallet/AccountsList.svelte
index 8466fbf6..2a72d5fb 100644
--- a/src/components/wallet/AccountsList.svelte
+++ b/src/components/wallet/AccountsList.svelte
@@ -3,7 +3,7 @@
import UIkit from 'uikit'
import Icons from 'uikit/dist/js/uikit-icons'
import { allAccounts, formatAccount, signingAccount } from '../../modules/accounts'
- import { printCoins, unscaledCoins } from '../../modules/coinHelpers'
+ import { printCoins } from '../../modules/coinHelpers'
import { connected } from '../../modules/networks'
import { setAccount } from '../../modules/accountActions'
import Actions from './Actions.svelte'
@@ -91,6 +91,23 @@
// Re-sort when preferences change
$: sortColumn && $allAccounts.length > 0 && privateSortAccounts(sortColumn)
+
+ const printAmount = (account, balance, isConnected) => {
+ const balanceFormatted = printCoins(balance);
+ if (!isConnected) {
+ return (balance > 0)
+ ? `${balanceFormatted}
`
+ : `
`;
+ }
+ if (account.on_chain != null && account.on_chain == false) {
+ return $_('wallet.account_list.account_on_chain');
+ }
+ if (account.on_chain) {
+ return balanceFormatted;
+ }
+ return $_('wallet.account_list.account_on_chain');
+ }
+
@@ -188,27 +205,11 @@
-
{printCoins(a.balance.unlocked)} |
- {#if a.on_chain != null && a.on_chain == false}
- {$_('wallet.account_list.account_on_chain')}
- {:else if a.on_chain}
-
- {#if unscaledCoins(a.balance) < 1}
-
-
- {$_('wallet.account_list.message')}
-
- {/if}
- {printCoins(a.balance.total)}
-
- {:else if a.balance == null}
- {$_('wallet.account_list.loading')}...
- {:else if !$connected}
- {$_('wallet.account_list.offline')}...
- {:else}
- {$_('wallet.account_list.account_on_chain')}
- {/if}
+ {@html printAmount(a, a.balance.unlocked, $connected)}
+ |
+
+ {@html printAmount(a, a.balance.total, $connected)}
|
{/if}
diff --git a/src/components/wallet/AddWatchAccount.svelte b/src/components/wallet/AddWatchAccount.svelte
index c1d8af66..b5e0be3f 100644
--- a/src/components/wallet/AddWatchAccount.svelte
+++ b/src/components/wallet/AddWatchAccount.svelte
@@ -3,11 +3,18 @@
import { addWatchAccount } from '../../modules/accountActions'
let address: string
+ let isSubmitting = false
- const initAccount = (address: string) => {
+ const initAccount = async (address: string) => {
+ isSubmitting=true
address = address.trim()
let isLegacy = address.length === 32 || address.startsWith('0'.padStart(32, '0'))
- addWatchAccount(address, isLegacy)
+ try {
+ await addWatchAccount(address, isLegacy);
+ } finally {
+ isSubmitting = false;
+ }
+
}
@@ -30,9 +37,14 @@