Skip to content

Commit

Permalink
Merge pull request #7423 from iotaledger/fix/sending-multiple-transac…
Browse files Browse the repository at this point in the history
…tions

Fix: Add check for Pending Transactions to SendFormPopup
  • Loading branch information
msarcev authored Sep 13, 2023
2 parents 79b80bf + ff7d9e7 commit 294a886
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion packages/desktop/components/popups/send/SendFormPopup.svelte
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
<script lang="ts">
import { get } from 'svelte/store'
import { Error } from '@ui'
import { closePopup, openPopup, PopupId } from '@auxiliary/popup'
import { localize } from '@core/i18n'
import { ownedNfts } from '@core/nfts'
import { getByteLengthOfString, MAX_METADATA_BYTES, MAX_TAG_BYTES } from '@core/utils'
import {
IAsset,
InclusionState,
isReservedTagKeyword,
newTransactionDetails,
NewTransactionType,
selectedAccountActivities,
setNewTransactionDetails,
TokenStandard,
} from '@core/wallet'
Expand Down Expand Up @@ -68,6 +71,9 @@
let activeTab: SendForm =
transactionDetails.type === NewTransactionType.TokenTransfer ? SendForm.SendToken : SendForm.SendNft
$: isTransferring =
$selectedAccountActivities.some((_activity) => _activity.inclusionState === InclusionState.Pending) ||
$selectedAccount.isTransferring
$: hasSpendableNfts = $ownedNfts.some((nft) => nft.isSpendable)
$: isLayer2 = !!iscpChainAddress
$: isSendTokenTab = activeTab === SendForm.SendToken
Expand Down Expand Up @@ -209,11 +215,14 @@
{/if}
</optional-inputs>
</send-form-inputs>
{#if isTransferring}
<Error error={localize('notifications.transferring')} />
{/if}
<popup-buttons class="flex flex-row flex-nowrap w-full space-x-4">
<Button classes="w-full" outline onClick={onCancelClick}>
{localize('actions.cancel')}
</Button>
<Button classes="w-full" onClick={onContinueClick}>
<Button classes="w-full" onClick={onContinueClick} disabled={isTransferring} isBusy={isTransferring}>
{localize('actions.next')}
</Button>
</popup-buttons>
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1751,7 +1751,7 @@
}
},
"syncing": "Please wait until synchronization is finished to change wallets.",
"transferring": "Please wait until all transactions are completed to change wallets.",
"transferring": "Please wait until all transactions are completed.",
"participating": "Please wait until all staking/voting transactions are completed to change wallets.",
"claimed": {
"success": "Transaction claimed",
Expand Down

0 comments on commit 294a886

Please sign in to comment.