From 88cae90539dd22c16e7e13e2874077b9ea132dfa Mon Sep 17 00:00:00 2001 From: Gary Ghayrat Date: Mon, 22 Aug 2022 13:09:32 -0400 Subject: [PATCH 01/10] Add Etherscan links to sender and receiver addr --- .../src/components/AccountReceiveTable.vue | 32 ++++++++++++++++--- frontend/src/utils/address.ts | 11 +++++++ 2 files changed, 38 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/AccountReceiveTable.vue b/frontend/src/components/AccountReceiveTable.vue index 60928aba7..c4ee32c56 100644 --- a/frontend/src/components/AccountReceiveTable.vue +++ b/frontend/src/components/AccountReceiveTable.vue @@ -233,7 +233,11 @@
@@ -241,7 +245,11 @@
- {{ formatAddress(col.value) }} + {{ + formatAddress(col.value) + }}
@@ -336,7 +344,7 @@ import AccountReceiveTableWithdrawConfirmation from 'components/AccountReceiveTa import BaseTooltip from 'src/components/BaseTooltip.vue'; import WithdrawForm from 'components/WithdrawForm.vue'; import { FeeEstimateResponse } from 'components/models'; -import { formatAddress, lookupOrFormatAddresses, toAddress, isAddressSafe } from 'src/utils/address'; +import { formatAddress, lookupOrReturnAddresses, toAddress, isAddressSafe } from 'src/utils/address'; import { MAINNET_PROVIDER } from 'src/utils/constants'; import { getEtherscanUrl } from 'src/utils/utils'; @@ -424,7 +432,13 @@ function useReceivedFundsTable(announcements: UserAnnouncement[], spendingKeyPai sortable: true, format: toString, }, - { align: 'left', field: 'from', label: vm.$i18n.tc('AccountReceiveTable.sender'), name: 'from', sortable: true }, + { + align: 'left', + field: 'from', + label: vm.$i18n.tc('AccountReceiveTable.sender'), + name: 'from', + sortable: true, + }, { align: 'left', field: 'receiver', @@ -473,7 +487,7 @@ function useReceivedFundsTable(announcements: UserAnnouncement[], spendingKeyPai // Format addresses to use ENS, CNS, or formatted address const fromAddresses = announcements.map((announcement) => announcement.from); - const formattedAddresses = await lookupOrFormatAddresses(fromAddresses, MAINNET_PROVIDER as Web3Provider); + const formattedAddresses = await lookupOrReturnAddresses(fromAddresses, MAINNET_PROVIDER as Web3Provider); formattedAnnouncements.value.forEach((announcement, index) => { announcement.from = formattedAddresses[index]; }); @@ -505,6 +519,13 @@ function useReceivedFundsTable(announcements: UserAnnouncement[], spendingKeyPai window.open(getEtherscanUrl(row.txHash, chainId)); } + function getSenderOrReceiverEtherscanUrl(address: string) { + if (!provider.value) throw new Error(vm.$i18n.tc('AccountReceiveTable.wallet-not-connected')); + // Assume mainnet if we don't have a provider with a valid chainId + const chainId = provider.value.network.chainId || 1; + return getEtherscanUrl(address, chainId); + } + /** * @notice Initialize the withdraw process * @param announcement Announcement to withdraw @@ -650,6 +671,7 @@ function useReceivedFundsTable(announcements: UserAnnouncement[], spendingKeyPai isWithdrawInProgress, mainTableColumns, openInEtherscan, + getSenderOrReceiverEtherscanUrl, paginationConfig, privacyModalAddressWarnings, showConfirmationModal, diff --git a/frontend/src/utils/address.ts b/frontend/src/utils/address.ts index d0c63c26a..536b018ee 100644 --- a/frontend/src/utils/address.ts +++ b/frontend/src/utils/address.ts @@ -25,6 +25,12 @@ export const lookupOrFormatAddress = async (address: string, provider: Provider) return domainName !== address ? domainName : formatAddress(address); }; +// Returns an ENS or CNS name if found, otherwise returns the address +export const lookupOrReturnAddress = async (address: string, provider: Provider) => { + const domainName = await lookupAddress(address, provider); + return domainName !== address ? domainName : address; +}; + // Returns ENS name that address resolves to, or null if not found export const lookupEnsName = async (address: string, provider: Provider) => { try { @@ -92,6 +98,11 @@ export const lookupOrFormatAddresses = async (addresses: string[], provider: Pro return Promise.all(promises); }; +export const lookupOrReturnAddresses = async (addresses: string[], provider: Provider) => { + const promises = addresses.map((address) => lookupOrReturnAddress(address, provider)); + return Promise.all(promises); +}; + // ================================================== Privacy Checks =================================================== // Checks for any potential risks of withdrawing to the provided name or address, returns object containing From add0345c25bf2f0eea06b2e9aa3eff4cc91e34fa Mon Sep 17 00:00:00 2001 From: Gary Ghayrat Date: Wed, 24 Aug 2022 09:32:17 -0400 Subject: [PATCH 02/10] Update style --- frontend/src/components/AccountReceiveTable.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/AccountReceiveTable.vue b/frontend/src/components/AccountReceiveTable.vue index c4ee32c56..26bfbe77c 100644 --- a/frontend/src/components/AccountReceiveTable.vue +++ b/frontend/src/components/AccountReceiveTable.vue @@ -234,7 +234,7 @@
{{ + >{{ formatAddress(col.value) }} @@ -246,7 +246,7 @@
{{ + >{{ formatAddress(col.value) }} From 161b1fb16a0a6d0899cbe0089dd8a48d16c5c99f Mon Sep 17 00:00:00 2001 From: Gary Ghayrat Date: Wed, 24 Aug 2022 10:40:30 -0400 Subject: [PATCH 03/10] Check for ens names --- frontend/src/components/AccountReceiveTable.vue | 10 +++++----- .../AccountReceiveTableWithdrawConfirmation.vue | 6 +++--- frontend/src/store/wallet.ts | 4 ++-- frontend/src/utils/address.ts | 14 +++++--------- frontend/src/utils/utils.ts | 9 ++++++--- 5 files changed, 21 insertions(+), 22 deletions(-) diff --git a/frontend/src/components/AccountReceiveTable.vue b/frontend/src/components/AccountReceiveTable.vue index 26bfbe77c..2ba9fa4c0 100644 --- a/frontend/src/components/AccountReceiveTable.vue +++ b/frontend/src/components/AccountReceiveTable.vue @@ -116,7 +116,7 @@
- {{ formatAddress(props.row.receiver) }} + {{ formatNameOrAddress(props.row.receiver) }}
@@ -235,7 +235,7 @@
{{ - formatAddress(col.value) + formatNameOrAddress(col.value) }} @@ -247,7 +247,7 @@
{{ - formatAddress(col.value) + formatNameOrAddress(col.value) }} @@ -344,7 +344,7 @@ import AccountReceiveTableWithdrawConfirmation from 'components/AccountReceiveTa import BaseTooltip from 'src/components/BaseTooltip.vue'; import WithdrawForm from 'components/WithdrawForm.vue'; import { FeeEstimateResponse } from 'components/models'; -import { formatAddress, lookupOrReturnAddresses, toAddress, isAddressSafe } from 'src/utils/address'; +import { formatNameOrAddress, lookupOrReturnAddresses, toAddress, isAddressSafe } from 'src/utils/address'; import { MAINNET_PROVIDER } from 'src/utils/constants'; import { getEtherscanUrl } from 'src/utils/utils'; @@ -655,7 +655,7 @@ function useReceivedFundsTable(announcements: UserAnnouncement[], spendingKeyPai destinationAddress, executeWithdraw, expanded, - formatAddress, + formatNameOrAddress, formatAmount, formatDate, formattedAnnouncements, diff --git a/frontend/src/components/AccountReceiveTableWithdrawConfirmation.vue b/frontend/src/components/AccountReceiveTableWithdrawConfirmation.vue index 97b4e819c..d0c885815 100644 --- a/frontend/src/components/AccountReceiveTableWithdrawConfirmation.vue +++ b/frontend/src/components/AccountReceiveTableWithdrawConfirmation.vue @@ -8,7 +8,7 @@
{{ $t('AccountReceiveTableWithdrawConfirmation.to') }}
-
{{ $q.screen.xs ? formatAddress(destinationAddress) : destinationAddress }}
+
{{ $q.screen.xs ? formatNameOrAddress(destinationAddress) : destinationAddress }}
{{ $t('AccountReceiveTableWithdrawConfirmation.amount') }}
@@ -120,7 +120,7 @@ import { computed, defineComponent, onMounted, PropType, ref } from '@vue/composition-api'; import { utils as umbraUtils, UserAnnouncement } from '@umbra/umbra-js'; import { FeeEstimate } from 'components/models'; -import { formatAddress, toAddress } from 'src/utils/address'; +import { formatNameOrAddress, toAddress } from 'src/utils/address'; import { BigNumber, formatUnits } from 'src/utils/ethers'; import { getEtherscanUrl, getGasPrice, humanizeTokenAmount, humanizeArithmeticResult } from 'src/utils/utils'; import useWalletStore from 'src/store/wallet'; @@ -282,7 +282,7 @@ export default defineComponent({ context, confirmationOptions, etherscanUrl, - formatAddress, + formatNameOrAddress, formattedAmount, formattedAmountReceived, formattedDefaultTxCost, diff --git a/frontend/src/store/wallet.ts b/frontend/src/store/wallet.ts index a2b4ec8d8..b0c5cda08 100644 --- a/frontend/src/store/wallet.ts +++ b/frontend/src/store/wallet.ts @@ -14,7 +14,7 @@ import { SupportedChainId, TokenInfoExtended, } from 'components/models'; -import { formatAddress, lookupEnsName, lookupCnsName } from 'src/utils/address'; +import { formatNameOrAddress, lookupEnsName, lookupCnsName } from 'src/utils/address'; import { ERC20_ABI, MAINNET_PROVIDER, MAINNET_RPC_URL, MULTICALL_ABI, MULTICALL_ADDRESSES } from 'src/utils/constants'; import { BigNumber, Contract, getAddress, Web3Provider, parseUnits } from 'src/utils/ethers'; import { UmbraApi } from 'src/utils/umbra-api'; @@ -424,7 +424,7 @@ export default function useWalletStore() { const userDisplayName = computed(() => { if (userEns.value) return userEns.value; if (userCns.value) return userCns.value; - return userAddress.value ? formatAddress(userAddress.value) : undefined; + return userAddress.value ? formatNameOrAddress(userAddress.value) : undefined; }); const keysMatch = computed(() => { diff --git a/frontend/src/utils/address.ts b/frontend/src/utils/address.ts index 536b018ee..754663fc1 100644 --- a/frontend/src/utils/address.ts +++ b/frontend/src/utils/address.ts @@ -5,13 +5,14 @@ import { CnsQueryResponse, Provider } from 'components/models'; import { utils } from '@umbra/umbra-js'; import { MAINNET_PROVIDER } from 'src/utils/constants'; -import { getAddress, Web3Provider } from 'src/utils/ethers'; +import { getAddress, Web3Provider, isHexString } from 'src/utils/ethers'; import { getChainById } from 'src/utils/utils'; import { i18n } from '../boot/i18n'; // ================================================== Address Helpers ================================================== // Returns an address with the following format: 0x1234...abcd -export const formatAddress = (address: string) => `${address.slice(0, 6)}...${address.slice(38)}`; +export const formatNameOrAddress = (address: string) => + isHexString(address) ? `${address.slice(0, 6)}...${address.slice(38)}` : address; // Returns an ENS or CNS name if found, otherwise returns the address export const lookupAddress = async (address: string, provider: Provider) => { @@ -22,7 +23,7 @@ export const lookupAddress = async (address: string, provider: Provider) => { // Returns an ENS or CNS name if found, otherwise returns a formatted version of the address export const lookupOrFormatAddress = async (address: string, provider: Provider) => { const domainName = await lookupAddress(address, provider); - return domainName !== address ? domainName : formatAddress(address); + return domainName !== address ? domainName : formatNameOrAddress(address); }; // Returns an ENS or CNS name if found, otherwise returns the address @@ -86,18 +87,13 @@ export const toAddress = utils.toAddress; // =============================================== Bulk Address Helpers ================================================ // Duplicates of the above methods for operating on multiple addresses in parallel -export const formatAddresses = (addresses: string[]) => addresses.map(formatAddress); +export const formatAddresses = (addresses: string[]) => addresses.map(formatNameOrAddress); export const lookupAddresses = async (addresses: string[], provider: Provider) => { const promises = addresses.map((address) => lookupAddress(address, provider)); return Promise.all(promises); }; -export const lookupOrFormatAddresses = async (addresses: string[], provider: Provider) => { - const promises = addresses.map((address) => lookupOrFormatAddress(address, provider)); - return Promise.all(promises); -}; - export const lookupOrReturnAddresses = async (addresses: string[], provider: Provider) => { const promises = addresses.map((address) => lookupOrReturnAddress(address, provider)); return Promise.all(promises); diff --git a/frontend/src/utils/utils.ts b/frontend/src/utils/utils.ts index 9d1a072c4..f549ae35c 100644 --- a/frontend/src/utils/utils.ts +++ b/frontend/src/utils/utils.ts @@ -1,14 +1,17 @@ import { supportedChains, TokenInfo } from 'src/components/models'; import { BigNumber, BigNumberish, hexValue, parseUnits, formatUnits } from './ethers'; - /** * @notice Generates the Etherscan URL based on the given `txHash` or `address and `chainId` */ export const getEtherscanUrl = (txHashOrAddress: string, chainId: number) => { - const group = txHashOrAddress.length === 42 ? 'address' : 'tx'; + const group = txHashOrAddress.length === 42 ? 'address' : txHashOrAddress.length === 66 ? 'tx' : 'ens'; const chain = getChainById(chainId); const networkPrefix = chain?.blockExplorerUrls?.length ? chain?.blockExplorerUrls[0] : 'https://etherscan.io'; - return `${networkPrefix}/${group}/${txHashOrAddress}`; + if (group === 'ens') { + return `${networkPrefix}/enslookup-search?search=${txHashOrAddress}`; + } else { + return `${networkPrefix}/${group}/${txHashOrAddress}`; + } }; /** From 40b6bddfad0e6d830d56850ec26fb70455d1a2cc Mon Sep 17 00:00:00 2001 From: Gary Ghayrat <61768337+garyghayrat@users.noreply.github.com> Date: Wed, 24 Aug 2022 18:32:13 +0000 Subject: [PATCH 04/10] Update Style Co-authored-by: Matt Solomon --- frontend/src/utils/address.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/utils/address.ts b/frontend/src/utils/address.ts index 754663fc1..488dad83c 100644 --- a/frontend/src/utils/address.ts +++ b/frontend/src/utils/address.ts @@ -11,8 +11,9 @@ import { i18n } from '../boot/i18n'; // ================================================== Address Helpers ================================================== // Returns an address with the following format: 0x1234...abcd -export const formatNameOrAddress = (address: string) => - isHexString(address) ? `${address.slice(0, 6)}...${address.slice(38)}` : address; +export const formatNameOrAddress = (nameOrAddress: string) => { + return isHexString(nameOrAddress) ? `${nameOrAddress.slice(0, 6)}...${nameOrAddress.slice(38)}` : nameOrAddress; +} // Returns an ENS or CNS name if found, otherwise returns the address export const lookupAddress = async (address: string, provider: Provider) => { From c35ae8dc35847f20bb50e4359b9156181168e1c4 Mon Sep 17 00:00:00 2001 From: Gary Ghayrat Date: Wed, 24 Aug 2022 14:43:10 -0400 Subject: [PATCH 05/10] Update getEtherscanUrl --- frontend/src/utils/address.ts | 8 +------- frontend/src/utils/utils.ts | 4 ++-- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/frontend/src/utils/address.ts b/frontend/src/utils/address.ts index 488dad83c..93d7319ef 100644 --- a/frontend/src/utils/address.ts +++ b/frontend/src/utils/address.ts @@ -13,7 +13,7 @@ import { i18n } from '../boot/i18n'; // Returns an address with the following format: 0x1234...abcd export const formatNameOrAddress = (nameOrAddress: string) => { return isHexString(nameOrAddress) ? `${nameOrAddress.slice(0, 6)}...${nameOrAddress.slice(38)}` : nameOrAddress; -} +}; // Returns an ENS or CNS name if found, otherwise returns the address export const lookupAddress = async (address: string, provider: Provider) => { @@ -21,12 +21,6 @@ export const lookupAddress = async (address: string, provider: Provider) => { return domainName ? domainName : address; }; -// Returns an ENS or CNS name if found, otherwise returns a formatted version of the address -export const lookupOrFormatAddress = async (address: string, provider: Provider) => { - const domainName = await lookupAddress(address, provider); - return domainName !== address ? domainName : formatNameOrAddress(address); -}; - // Returns an ENS or CNS name if found, otherwise returns the address export const lookupOrReturnAddress = async (address: string, provider: Provider) => { const domainName = await lookupAddress(address, provider); diff --git a/frontend/src/utils/utils.ts b/frontend/src/utils/utils.ts index f549ae35c..bd2ae8162 100644 --- a/frontend/src/utils/utils.ts +++ b/frontend/src/utils/utils.ts @@ -1,10 +1,10 @@ import { supportedChains, TokenInfo } from 'src/components/models'; -import { BigNumber, BigNumberish, hexValue, parseUnits, formatUnits } from './ethers'; +import { BigNumber, BigNumberish, hexValue, parseUnits, formatUnits, isHexString } from './ethers'; /** * @notice Generates the Etherscan URL based on the given `txHash` or `address and `chainId` */ export const getEtherscanUrl = (txHashOrAddress: string, chainId: number) => { - const group = txHashOrAddress.length === 42 ? 'address' : txHashOrAddress.length === 66 ? 'tx' : 'ens'; + const group = isHexString(txHashOrAddress) ? (txHashOrAddress.length === 42 ? 'address' : 'tx') : 'ens'; const chain = getChainById(chainId); const networkPrefix = chain?.blockExplorerUrls?.length ? chain?.blockExplorerUrls[0] : 'https://etherscan.io'; if (group === 'ens') { From 689cd973f10fcda7fe93b2190307528a38eea44f Mon Sep 17 00:00:00 2001 From: Gary Ghayrat Date: Wed, 24 Aug 2022 14:57:36 -0400 Subject: [PATCH 06/10] Update blockExplorerUrls --- frontend/src/components/models.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/models.ts b/frontend/src/components/models.ts index fc92b097c..bb288dbc4 100644 --- a/frontend/src/components/models.ts +++ b/frontend/src/components/models.ts @@ -80,7 +80,7 @@ export const supportedChains: Array = [ logoURI: ETH_NETWORK_LOGO, }, rpcUrls: ['https://mainnet.optimism.io', `https://optimism-mainnet.infura.io/v3/${String(process.env.INFURA_ID)}`], - blockExplorerUrls: ['https://optimistic.etherscan.io/'], + blockExplorerUrls: ['https://optimistic.etherscan.io'], iconUrls: ['/networks/optimism.svg'], logoURI: '/networks/optimism.svg', }, @@ -110,7 +110,7 @@ export const supportedChains: Array = [ logoURI: ETH_NETWORK_LOGO, }, rpcUrls: ['https://arb1.arbitrum.io/rpc', `https://arbitrum-mainnet.infura.io/v3/${String(process.env.INFURA_ID)}`], - blockExplorerUrls: ['https://arbiscan.io/'], + blockExplorerUrls: ['https://arbiscan.io'], iconUrls: ['/networks/arbitrum.svg'], logoURI: '/networks/arbitrum.svg', }, From 02d40aa4c2bbd37d7b1471e746e09d3e22921ffa Mon Sep 17 00:00:00 2001 From: Gary Ghayrat Date: Mon, 29 Aug 2022 13:02:08 -0400 Subject: [PATCH 07/10] WIP --- frontend/src/components/AccountReceiveTable.vue | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/AccountReceiveTable.vue b/frontend/src/components/AccountReceiveTable.vue index 2ba9fa4c0..d1281a52d 100644 --- a/frontend/src/components/AccountReceiveTable.vue +++ b/frontend/src/components/AccountReceiveTable.vue @@ -234,9 +234,9 @@
@@ -348,6 +348,10 @@ import { formatNameOrAddress, lookupOrReturnAddresses, toAddress, isAddressSafe import { MAINNET_PROVIDER } from 'src/utils/constants'; import { getEtherscanUrl } from 'src/utils/utils'; +interface ReceiveTableAnnouncement extends UserAnnouncement { + formattedFrom: string; +} + function useAdvancedFeatures(spendingKeyPair: KeyPair) { const vm = getCurrentInstance()!; const { startBlock, endBlock, scanPrivateKey } = useSettingsStore(); @@ -480,7 +484,8 @@ function useReceivedFundsTable(announcements: UserAnnouncement[], spendingKeyPai }; // Format announcements so from addresses support ENS/CNS, and so we can easily detect withdrawals - const formattedAnnouncements = ref(announcements.reverse()); // We reverse so most recent transaction is first + let formattedAnnouncements = ref(announcements.reverse()); // We reverse so most recent transaction is first + formattedAnnouncements = Object.assign(formattedAnnouncements, { formattedFrom: '' }); onMounted(async () => { isLoading.value = true; if (!provider.value) throw new Error(vm.$i18n.tc('AccountReceiveTable.wallet-not-connected')); @@ -489,7 +494,8 @@ function useReceivedFundsTable(announcements: UserAnnouncement[], spendingKeyPai const fromAddresses = announcements.map((announcement) => announcement.from); const formattedAddresses = await lookupOrReturnAddresses(fromAddresses, MAINNET_PROVIDER as Web3Provider); formattedAnnouncements.value.forEach((announcement, index) => { - announcement.from = formattedAddresses[index]; + announcement.formattedFrom = formattedAddresses[index]; + announcement.from = fromAddresses[index]; }); // Find announcements that have been withdrawn From 5f632083c6e2d7a86ddcfc078b6b81b37fd4c50f Mon Sep 17 00:00:00 2001 From: Gary Ghayrat Date: Mon, 29 Aug 2022 13:41:21 -0400 Subject: [PATCH 08/10] Link ENS name to corresponding addr --- frontend/src/components/AccountReceiveTable.vue | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/frontend/src/components/AccountReceiveTable.vue b/frontend/src/components/AccountReceiveTable.vue index d1281a52d..6de266e73 100644 --- a/frontend/src/components/AccountReceiveTable.vue +++ b/frontend/src/components/AccountReceiveTable.vue @@ -234,9 +234,9 @@
@@ -348,10 +348,6 @@ import { formatNameOrAddress, lookupOrReturnAddresses, toAddress, isAddressSafe import { MAINNET_PROVIDER } from 'src/utils/constants'; import { getEtherscanUrl } from 'src/utils/utils'; -interface ReceiveTableAnnouncement extends UserAnnouncement { - formattedFrom: string; -} - function useAdvancedFeatures(spendingKeyPair: KeyPair) { const vm = getCurrentInstance()!; const { startBlock, endBlock, scanPrivateKey } = useSettingsStore(); @@ -397,6 +393,10 @@ function useAdvancedFeatures(spendingKeyPair: KeyPair) { return { scanDescriptionString, hidePrivateKey, togglePrivateKey, spendingPrivateKey, copyPrivateKey }; } +interface ReceiveTableAnnouncement extends UserAnnouncement { + formattedFrom: string; +} + function useReceivedFundsTable(announcements: UserAnnouncement[], spendingKeyPair: KeyPair) { const { NATIVE_TOKEN, network, provider, signer, umbra, userAddress, relayer, tokens } = useWalletStore(); const { setIsInWithdrawFlow } = useStatusesStore(); @@ -484,8 +484,7 @@ function useReceivedFundsTable(announcements: UserAnnouncement[], spendingKeyPai }; // Format announcements so from addresses support ENS/CNS, and so we can easily detect withdrawals - let formattedAnnouncements = ref(announcements.reverse()); // We reverse so most recent transaction is first - formattedAnnouncements = Object.assign(formattedAnnouncements, { formattedFrom: '' }); + const formattedAnnouncements = ref(announcements.reverse() as ReceiveTableAnnouncement[]); // We reverse so most recent transaction is first onMounted(async () => { isLoading.value = true; if (!provider.value) throw new Error(vm.$i18n.tc('AccountReceiveTable.wallet-not-connected')); From fcd1a3f1003e78fd001a2fba20d9f62826c0115a Mon Sep 17 00:00:00 2001 From: Gary Ghayrat Date: Wed, 31 Aug 2022 15:30:27 -0400 Subject: [PATCH 09/10] Add etherscan link on Withdrawn button --- .../src/components/AccountReceiveTable.vue | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/frontend/src/components/AccountReceiveTable.vue b/frontend/src/components/AccountReceiveTable.vue index 6de266e73..a0fc8931e 100644 --- a/frontend/src/components/AccountReceiveTable.vue +++ b/frontend/src/components/AccountReceiveTable.vue @@ -233,11 +233,7 @@
- {{ - formatNameOrAddress(props.row.formattedFrom) - }} + {{ formatNameOrAddress(props.row.formattedFrom) }}
@@ -245,11 +241,7 @@
- {{ - formatNameOrAddress(col.value) - }} + {{ formatNameOrAddress(col.value) }}
@@ -280,7 +272,17 @@ if (advancedMode) expanded = expanded[0] === props.key ? [] : [props.key]; " > - {{ $t('AccountReceiveTable.withdrawn') }} + +
+ {{ $t('AccountReceiveTable.withdrawn') }} + +
Date: Thu, 1 Sep 2022 13:47:39 -0400 Subject: [PATCH 10/10] Add Read access to fs in foundry.toml --- contracts-periphery/foundry.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contracts-periphery/foundry.toml b/contracts-periphery/foundry.toml index 93566dd48..47fa588e2 100644 --- a/contracts-periphery/foundry.toml +++ b/contracts-periphery/foundry.toml @@ -1,8 +1,10 @@ [profile.default] verbosity = 3 +fs_permissions = [{ access = "read", path = "./"}] [profile.ci] fuzz_runs = 10000 +fs_permissions = [{ access = "read", path = "./"}] # See more config options https://github.com/gakonst/foundry/tree/master/config [rpc_endpoints]