diff --git a/packages/desktop/components/popup/popups/AddProposalPopup.svelte b/packages/desktop/components/popup/popups/AddProposalPopup.svelte
index 2f10ce7abb..a84a47a64d 100644
--- a/packages/desktop/components/popup/popups/AddProposalPopup.svelte
+++ b/packages/desktop/components/popup/popups/AddProposalPopup.svelte
@@ -10,8 +10,10 @@
import { truncateString } from '@core/utils/string'
import type { IAuth } from '@iota/sdk/out/types'
import { closePopup, openPopup, PopupId } from '@desktop/auxiliary/popup'
- import { Checkbox, NodeInput, Text, TextInput, TextType } from '@ui'
- import { Button } from '@bloomwalletio/ui'
+ import { NodeInput } from '@ui'
+ import { Checkbox, TextInput } from '@bloomwalletio/ui'
+ import PopupTemplate from '../PopupTemplate.svelte'
+ import { IError } from '@core/error'
export let initialEventId: string
export let initialNodeUrl: string
@@ -41,15 +43,16 @@
nodeInput?.validate(),
])
await registerParticipationWrapper()
- updateActiveAccountPersistedData($selectedAccount.index, {
- removedProposalIds: $selectedAccount.removedProposalIds?.filter((id) => id !== inputtedEventId),
+ updateActiveAccountPersistedData($selectedAccount?.index, {
+ removedProposalIds: $selectedAccount?.removedProposalIds?.filter((id) => id !== inputtedEventId),
})
isBusy = false
} catch (err) {
isBusy = false
- const isAuthenticationError = err?.error?.match(/(username)|(password)|(jwt)/g)?.length > 0
- const isEventError = err?.error?.match(/(the requested data)|(was not found)/)?.length > 0
- const isNodeError = err?.error?.match(/(failed to lookup address information)|(dns error)/)?.length > 0
+ const error = err as IError
+ const isAuthenticationError = error?.error?.match(/(username)|(password)|(jwt)/g)
+ const isEventError = error?.error?.match(/(the requested data)|(was not found)/)
+ const isNodeError = error?.error?.match(/(failed to lookup address information)|(dns error)/)
if (isAuthenticationError) {
openNodeAuthRequiredPopup()
} else if (isEventError) {
@@ -65,7 +68,7 @@
text: localize('error.node.dns'),
})
} else if (!nodeInputError && !eventIdError) {
- handleError(err)
+ handleError(error)
}
}
}
@@ -82,7 +85,7 @@
node: { url: nodeUrl, auth },
eventsToRegister: isRegisteringAllProposals ? [] : [eventId],
}
- const accounts = isAddingForAllAccounts ? $activeAccounts : [$selectedAccount]
+ const accounts = isAddingForAllAccounts ? $activeAccounts : $selectedAccount ? [$selectedAccount] : []
await registerProposalsForAccounts(options, accounts)
showNotification({
variant: 'success',
@@ -120,29 +123,42 @@
}
-
+
+
+
diff --git a/packages/shared/src/components/inputs/Checkbox.svelte b/packages/shared/src/components/inputs/Checkbox.svelte
deleted file mode 100644
index e56403bbcc..0000000000
--- a/packages/shared/src/components/inputs/Checkbox.svelte
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- {#if label}
- {label}
- {:else if $$slots.label}
-
- {/if}
-
-
-
diff --git a/packages/shared/src/components/inputs/NodeInput.svelte b/packages/shared/src/components/inputs/NodeInput.svelte
index cdb8505e06..ca08debc94 100644
--- a/packages/shared/src/components/inputs/NodeInput.svelte
+++ b/packages/shared/src/components/inputs/NodeInput.svelte
@@ -1,5 +1,5 @@
-
diff --git a/packages/shared/src/components/inputs/index.ts b/packages/shared/src/components/inputs/index.ts
index 2236158f03..e16336ac2d 100644
--- a/packages/shared/src/components/inputs/index.ts
+++ b/packages/shared/src/components/inputs/index.ts
@@ -1,7 +1,6 @@
export { default as AccountInput } from './AccountInput.svelte'
export { default as AliasInput } from './AliasInput.svelte'
export { default as AmountInput } from './AmountInput.svelte'
-export { default as Checkbox } from './Checkbox.svelte'
export { default as ClosableInput } from './ClosableInput.svelte'
export { default as Dropdown } from './Dropdown.svelte'
export { default as Dropzone } from './Dropzone.svelte'
diff --git a/packages/shared/src/components/molecules/SelectorInput.svelte b/packages/shared/src/components/molecules/SelectorInput.svelte
deleted file mode 100644
index 827a419471..0000000000
--- a/packages/shared/src/components/molecules/SelectorInput.svelte
+++ /dev/null
@@ -1,130 +0,0 @@
-
-
-
-
-
- {#if selected?.key && selected?.value}
-
- {truncateString(selected.displayedValue ?? selected.value, 9, 9)}
-
- {/if}
-
-
-
- {#if filteredOptions.length > 0 && (!readonly || overrideShowOptions)}
- inputElement.blur()}
- >
-
- {#each filteredOptions as option, index}
-
- {/each}
-
-
- {/if}
-
diff --git a/packages/shared/src/components/molecules/activity-info/index.js b/packages/shared/src/components/molecules/activity-info/index.ts
similarity index 69%
rename from packages/shared/src/components/molecules/activity-info/index.js
rename to packages/shared/src/components/molecules/activity-info/index.ts
index 8cb3ad5495..bbb6f77324 100644
--- a/packages/shared/src/components/molecules/activity-info/index.js
+++ b/packages/shared/src/components/molecules/activity-info/index.ts
@@ -1,9 +1,9 @@
-export { default as AliasActivityInformation } from './AliasActivityInformation'
-export { default as ConsolidationActivityInformation } from './ConsolidationActivityInformation'
-export { default as FoundryActivityInformation } from './FoundryActivityInformation'
-export { default as GenericActivityInformation } from './GenericActivityInformation'
-export { default as GovernanceActivityInformation } from './GovernanceActivityInformation'
-export { default as TokenActivityInformation } from './TokenActivityInformation'
-export { default as NftActivityInformation } from './NftActivityInformation'
-export { default as NftMetadataInformation } from './NftMetadataInformation'
-export { default as SmartContractActivityInformation } from './SmartContractActivityInformation'
+export { default as AliasActivityInformation } from './AliasActivityInformation.svelte'
+export { default as ConsolidationActivityInformation } from './ConsolidationActivityInformation.svelte'
+export { default as FoundryActivityInformation } from './FoundryActivityInformation.svelte'
+export { default as GenericActivityInformation } from './GenericActivityInformation.svelte'
+export { default as GovernanceActivityInformation } from './GovernanceActivityInformation.svelte'
+export { default as TokenActivityInformation } from './TokenActivityInformation.svelte'
+export { default as NftActivityInformation } from './NftActivityInformation.svelte'
+export { default as NftMetadataInformation } from './NftMetadataInformation.svelte'
+export { default as SmartContractActivityInformation } from './SmartContractActivityInformation.svelte'
diff --git a/packages/shared/src/components/molecules/filter-items/index.js b/packages/shared/src/components/molecules/filter-items/index.ts
similarity index 100%
rename from packages/shared/src/components/molecules/filter-items/index.js
rename to packages/shared/src/components/molecules/filter-items/index.ts
diff --git a/packages/shared/src/components/molecules/index.ts b/packages/shared/src/components/molecules/index.ts
index b879334b2f..8693583434 100644
--- a/packages/shared/src/components/molecules/index.ts
+++ b/packages/shared/src/components/molecules/index.ts
@@ -9,7 +9,6 @@ export { default as NftGallery } from './NftGallery.svelte'
export { default as NftGalleryItem } from './NftGalleryItem.svelte'
export { default as NftMedia } from './NftMedia.svelte'
export { default as NodeAuthTab } from './NodeAuthTab.svelte'
-export { default as SelectorInput } from './SelectorInput.svelte'
export { default as ShimmerClaimingAccountList } from './ShimmerClaimingAccountList.svelte'
export { default as TransactionAssetSection } from './TransactionAssetSection.svelte'
diff --git a/packages/shared/src/lib/core/profile/actions/active-accounts/updateActiveAccountPersistedData.ts b/packages/shared/src/lib/core/profile/actions/active-accounts/updateActiveAccountPersistedData.ts
index 4a41333650..c9b380e257 100644
--- a/packages/shared/src/lib/core/profile/actions/active-accounts/updateActiveAccountPersistedData.ts
+++ b/packages/shared/src/lib/core/profile/actions/active-accounts/updateActiveAccountPersistedData.ts
@@ -4,11 +4,14 @@ import { updateAccountPersistedDataOnActiveProfile } from '@core/profile/stores'
import { get } from 'svelte/store'
export function updateActiveAccountPersistedData(
- acccountIndex: number,
+ accountIndex: number | undefined,
partialAccountPersistedData: Partial
): void {
- if (get(selectedAccountIndex) === acccountIndex) {
+ if (accountIndex === undefined) {
+ return
+ }
+ if (get(selectedAccountIndex) === accountIndex) {
updateSelectedAccount(partialAccountPersistedData)
}
- updateAccountPersistedDataOnActiveProfile(acccountIndex, partialAccountPersistedData)
+ updateAccountPersistedDataOnActiveProfile(accountIndex, partialAccountPersistedData)
}
diff --git a/packages/shared/src/locales/en.json b/packages/shared/src/locales/en.json
index 1fcf8df979..6e9ba1a4c1 100644
--- a/packages/shared/src/locales/en.json
+++ b/packages/shared/src/locales/en.json
@@ -1171,7 +1171,8 @@
"addProposal": {
"title": "Add proposal",
"body": "Please provide the information listed below to add a proposal.",
- "addToAllAccounts": "Add the proposal to all accounts"
+ "addToAllAccounts": "Add the proposal to all accounts",
+ "addAllProposalsOnNode": "Add all proposals on this node"
},
"editProposal": {
"title": "Edit proposal",