diff --git a/packages/mask/popups/components/WalletItem/index.tsx b/packages/mask/popups/components/WalletItem/index.tsx index b926ac112de6..36dfad863d6b 100644 --- a/packages/mask/popups/components/WalletItem/index.tsx +++ b/packages/mask/popups/components/WalletItem/index.tsx @@ -116,6 +116,8 @@ export const WalletItem = memo(function WalletItem({ ) const fireflyAccount = useSubscription(PersistentStorages.Settings.storage.firefly_account.subscription) + if (wallet.owner) return null + return ( !x.owner) }, [wallets]) } diff --git a/packages/web3-providers/src/Web3/EVM/state/TransactionFormatter.ts b/packages/web3-providers/src/Web3/EVM/state/TransactionFormatter.ts index 333845fb1e9f..b131135eef8c 100644 --- a/packages/web3-providers/src/Web3/EVM/state/TransactionFormatter.ts +++ b/packages/web3-providers/src/Web3/EVM/state/TransactionFormatter.ts @@ -25,7 +25,6 @@ import { RedPacketDescriptor } from './TransactionFormatter/descriptors/RedPacke import { ERC20Descriptor } from './TransactionFormatter/descriptors/ERC20.js' import { ERC721Descriptor } from './TransactionFormatter/descriptors/ERC721.js' import { SavingsDescriptor } from './TransactionFormatter/descriptors/Savings.js' -import { SmartPayDescriptor } from './TransactionFormatter/descriptors/SmartPay.js' import { LensDescriptor } from './TransactionFormatter/descriptors/Lens.js' import { AirdropDescriptor } from './TransactionFormatter/descriptors/Airdrop.js' import { TransactionFormatterState } from '../../Base/state/TransactionFormatter.js' @@ -40,7 +39,6 @@ export class EVMTransactionFormatter extends TransactionFormatterState, - ): Promise { - const context = context_ as TransactionContext - if (!context.methods?.length) return - - for (const { name, parameters } of context.methods) { - switch (name) { - case 'fund': - if (!parameters?.owner || !parameters.nonce) break - return { - chainId: context.chainId, - title: 'Create Smart Pay wallet', - description: 'Transaction submitted.', - snackbar: { - successfulDescription: 'Created a SmartPay wallet on Polygon network.', - failedDescription: '', - }, - popup: { - method: name, - }, - } - case 'deploy': - return { - chainId: context.chainId, - title: 'Deploy Smarty Pay wallet', - description: 'Transaction submitted.', - snackbar: { - successfulDescription: 'Deploy a SmartPay wallet on Polygon network.', - failedDescription: '', - }, - popup: { - method: name, - }, - } - case 'changeOwner': - return { - chainId: context.chainId, - title: 'Change Owner', - description: 'Transaction submitted.', - snackbar: { - successfulDescription: 'Owner changed.', - failedDescription: '', - }, - popup: { - method: name, - }, - } - default: - continue - } - } - return - } -} diff --git a/packages/web3-shared/evm/src/constants/constants.ts b/packages/web3-shared/evm/src/constants/constants.ts index d7228c3c524e..940de8f3d83f 100644 --- a/packages/web3-shared/evm/src/constants/constants.ts +++ b/packages/web3-shared/evm/src/constants/constants.ts @@ -17,7 +17,7 @@ import OpenOcean from '@masknet/web3-constants/evm/openocean.json' with { type: import Pet from '@masknet/web3-constants/evm/pet.json' with { type: 'json' } import RedPacket from '@masknet/web3-constants/evm/red-packet.json' with { type: 'json' } import BUILTIN_RPC from '@masknet/web3-constants/evm/rpc.json' with { type: 'json' } -import SmartPay from '@masknet/web3-constants/evm/smart-pay.json' with { type: 'json' } + import SpaceId from '@masknet/web3-constants/evm/space-id.json' with { type: 'json' } import TokenAssetBaseURL from '@masknet/web3-constants/evm/token-asset-base-url.json' with { type: 'json' } import TokenList from '@masknet/web3-constants/evm/token-list.json' with { type: 'json' } @@ -121,11 +121,6 @@ export const getPetConstants = transformAll(ChainId, Pet) export const usePetConstant = transformHook(getPetConstants) export const usePetConstants = transformAllHook(getPetConstants) -export const getSmartPayConstant = transform(ChainId, SmartPay) -export const getSmartPayConstants = transformAll(ChainId, SmartPay) -export const useSmartPayConstant = transformHook(getSmartPayConstants) -export const useSmartPayConstants = transformAllHook(getSmartPayConstants) - export const getENSConstants = transformAll(ChainId, ENS) export const getArbConstants = transformAll(ChainId, Arb) export const getSpaceIdConstants = transformAll(ChainId, SpaceId)