Skip to content

Commit 3767304

Browse files
authored
feat: hidden old smartpay wallet (#12308)
1 parent 882c28d commit 3767304

File tree

7 files changed

+6
-133
lines changed

7 files changed

+6
-133
lines changed

packages/mask/popups/components/WalletItem/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ export const WalletItem = memo<WalletItemProps>(function WalletItem({
116116
)
117117
const fireflyAccount = useSubscription(PersistentStorages.Settings.storage.firefly_account.subscription)
118118

119+
if (wallet.owner) return null
120+
119121
return (
120122
<ListItem
121123
className={cx(classes.item, className)}

packages/shared-base/src/types/Wallet.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ export interface Wallet {
2929
storedKeyInfo?: api.IStoredKeyInfo
3030
/** record created at */
3131
createdAt: Date
32+
/** an abstract wallet has a owner */
33+
owner?: string
3234
/** record updated at */
3335
updatedAt: Date
3436
/** persona identifier */

packages/web3-constants/evm/smart-pay.json

Lines changed: 0 additions & 64 deletions
This file was deleted.

packages/web3-hooks/base/src/useWallets.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,6 @@ export function useWallets() {
3939
return 0
4040
}
4141
})
42+
.filter((x) => !x.owner)
4243
}, [wallets])
4344
}

packages/web3-providers/src/Web3/EVM/state/TransactionFormatter.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import { RedPacketDescriptor } from './TransactionFormatter/descriptors/RedPacke
2525
import { ERC20Descriptor } from './TransactionFormatter/descriptors/ERC20.js'
2626
import { ERC721Descriptor } from './TransactionFormatter/descriptors/ERC721.js'
2727
import { SavingsDescriptor } from './TransactionFormatter/descriptors/Savings.js'
28-
import { SmartPayDescriptor } from './TransactionFormatter/descriptors/SmartPay.js'
2928
import { LensDescriptor } from './TransactionFormatter/descriptors/Lens.js'
3029
import { AirdropDescriptor } from './TransactionFormatter/descriptors/Airdrop.js'
3130
import { TransactionFormatterState } from '../../Base/state/TransactionFormatter.js'
@@ -40,7 +39,6 @@ export class EVMTransactionFormatter extends TransactionFormatterState<ChainId,
4039
new SavingsDescriptor(),
4140
new GitcoinDescriptor(),
4241
new RedPacketDescriptor(),
43-
new SmartPayDescriptor(),
4442
new ERC20Descriptor(),
4543
new ERC721Descriptor(),
4644
new BaseDescriptor(),

packages/web3-providers/src/Web3/EVM/state/TransactionFormatter/descriptors/SmartPay.ts

Lines changed: 0 additions & 61 deletions
This file was deleted.

packages/web3-shared/evm/src/constants/constants.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import OpenOcean from '@masknet/web3-constants/evm/openocean.json' with { type:
1717
import Pet from '@masknet/web3-constants/evm/pet.json' with { type: 'json' }
1818
import RedPacket from '@masknet/web3-constants/evm/red-packet.json' with { type: 'json' }
1919
import BUILTIN_RPC from '@masknet/web3-constants/evm/rpc.json' with { type: 'json' }
20-
import SmartPay from '@masknet/web3-constants/evm/smart-pay.json' with { type: 'json' }
20+
2121
import SpaceId from '@masknet/web3-constants/evm/space-id.json' with { type: 'json' }
2222
import TokenAssetBaseURL from '@masknet/web3-constants/evm/token-asset-base-url.json' with { type: 'json' }
2323
import TokenList from '@masknet/web3-constants/evm/token-list.json' with { type: 'json' }
@@ -121,11 +121,6 @@ export const getPetConstants = transformAll(ChainId, Pet)
121121
export const usePetConstant = transformHook(getPetConstants)
122122
export const usePetConstants = transformAllHook(getPetConstants)
123123

124-
export const getSmartPayConstant = transform(ChainId, SmartPay)
125-
export const getSmartPayConstants = transformAll(ChainId, SmartPay)
126-
export const useSmartPayConstant = transformHook(getSmartPayConstants)
127-
export const useSmartPayConstants = transformAllHook(getSmartPayConstants)
128-
129124
export const getENSConstants = transformAll(ChainId, ENS)
130125
export const getArbConstants = transformAll(ChainId, Arb)
131126
export const getSpaceIdConstants = transformAll(ChainId, SpaceId)

0 commit comments

Comments
 (0)