Skip to content

Commit

Permalink
Merge branch 'develop' into 1911-rebrand-proposaldetailsview
Browse files Browse the repository at this point in the history
  • Loading branch information
jeeanribeiro authored Feb 23, 2024
2 parents fb5195e + 4d50460 commit b83fa53
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import { TokenTransferData } from '@core/wallet'
import { Nft } from '@core/nfts'
import { getNftByIdFromAllAccountNfts } from '@core/nfts/actions'
import { Alert, Table } from '@bloomwalletio/ui'
import { Alert, Link, Table, Text } from '@bloomwalletio/ui'
import { PopupId, closePopup, modifyPopupState, openPopup } from '@desktop/auxiliary/popup'
import { truncateString } from '@core/utils'
import { openUrlInBrowser } from '@core/app'
Expand Down Expand Up @@ -161,18 +161,29 @@
<div class="space-y-5">
{#if isSmartContractCall}
<div class="flex flex-col gap-3">
<Alert variant="warning" text={localize('popups.smartContractCall.unableToVerify')} />
<Table
items={[
{
key: localize('general.address'),
value: truncateString(String(preparedTransaction.to), 16, 16),
onClick: () => onExplorerClick(String(preparedTransaction.to)),
},
{ key: localize('general.methodName'), value: methodName },
{ key: localize('general.data'), value: String(preparedTransaction.data), copyable: true },
]}
/>
<Alert variant="warning">
<Text slot="text">
{localize('popups.smartContractCall.unableToVerify')}
<Link
on:click={() => onExplorerClick(String(preparedTransaction.to))}
text={localize('popups.smartContractCall.viewSmartContract')}
/>
</Text>
<Table
collapsible
collapsibleTitle={localize('general.details')}
slot="body"
items={[
{
key: localize('general.address'),
value: truncateString(String(preparedTransaction.to), 16, 16),
onClick: () => onExplorerClick(String(preparedTransaction.to)),
},
{ key: localize('general.methodName'), value: methodName },
{ key: localize('general.data'), value: String(preparedTransaction.data), copyable: true },
]}
/>
</Alert>
</div>
{:else}
<TransactionAssetSection {baseCoinTransfer} {tokenTransfer} {nft} />
Expand Down
1 change: 1 addition & 0 deletions packages/shared/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -993,6 +993,7 @@
"smartContractCall": {
"title": "Smart contract call to {contractAddress}",
"unableToVerify": "Bloom is unable to verify the smart contract call. Only proceed with apps you trust.",
"viewSmartContract": "View Smart Contract",
"action": "Confirm",
"success": "Smart contract call to {recipient}"
},
Expand Down

0 comments on commit b83fa53

Please sign in to comment.