diff --git a/packages/dapp-svelte-wallet/ui/lib/ListCard.svelte b/packages/dapp-svelte-wallet/ui/lib/ListCard.svelte index bb9658dc4d1..cbdd77127c2 100644 --- a/packages/dapp-svelte-wallet/ui/lib/ListCard.svelte +++ b/packages/dapp-svelte-wallet/ui/lib/ListCard.svelte @@ -14,7 +14,9 @@ // true iff new items should start expanded export let expandDefault = false; - let expandState = []; + export let storeKey = ''; + + let expandState = storeKey ? JSON.parse(localStorage.getItem(`ListCard.${storeKey}`) || '[]') : []; $: isExpanded = id => expandState.includes(id) !== expandDefault; @@ -25,6 +27,9 @@ } else { expandState = [...expandState, id]; } + if (storeKey) { + localStorage.setItem(`ListCard.${storeKey}`, JSON.stringify(expandState)); + } }; diff --git a/packages/dapp-svelte-wallet/ui/src/Contacts.svelte b/packages/dapp-svelte-wallet/ui/src/Contacts.svelte index b4f1e44f26f..b1db3f76ddc 100644 --- a/packages/dapp-svelte-wallet/ui/src/Contacts.svelte +++ b/packages/dapp-svelte-wallet/ui/src/Contacts.svelte @@ -9,7 +9,7 @@ import { contacts, walletP } from './store'; - +
- +
diff --git a/packages/dapp-svelte-wallet/ui/src/Issuers.svelte b/packages/dapp-svelte-wallet/ui/src/Issuers.svelte index 568144040cc..d18e041a2d1 100644 --- a/packages/dapp-svelte-wallet/ui/src/Issuers.svelte +++ b/packages/dapp-svelte-wallet/ui/src/Issuers.svelte @@ -9,7 +9,7 @@ import { issuers, walletP } from './store'; - +
pmt.status !== 'deposited'); - +
diff --git a/packages/dapp-svelte-wallet/ui/src/Purses.svelte b/packages/dapp-svelte-wallet/ui/src/Purses.svelte index 8f8d5d5d13c..20ae47b12ea 100644 --- a/packages/dapp-svelte-wallet/ui/src/Purses.svelte +++ b/packages/dapp-svelte-wallet/ui/src/Purses.svelte @@ -6,7 +6,7 @@ import { purses } from './store'; - +
diff --git a/packages/dapp-svelte-wallet/ui/src/Transactions.svelte b/packages/dapp-svelte-wallet/ui/src/Transactions.svelte index 599a002c0c4..de4f7192bbb 100644 --- a/packages/dapp-svelte-wallet/ui/src/Transactions.svelte +++ b/packages/dapp-svelte-wallet/ui/src/Transactions.svelte @@ -7,7 +7,11 @@ - status === undefined || status === 'pending')} expandDefault={true}> + status === undefined || status === 'pending')} + storeKey="inbox" + expandDefault={true} +>
diff --git a/packages/dapp-svelte-wallet/ui/src/captp.js b/packages/dapp-svelte-wallet/ui/src/captp.js index 3daa042bf5a..e4caa52c484 100644 --- a/packages/dapp-svelte-wallet/ui/src/captp.js +++ b/packages/dapp-svelte-wallet/ui/src/captp.js @@ -22,7 +22,7 @@ export function makeCapTPConnection(makeConnection, { onReset }) { // Throw away our state. bootPK = makePromiseKit(); onReset(bootPK.promise.then(_ => true)); - abort(); + abort && abort(); } // Stable identity for the connection handler.