Skip to content

Commit

Permalink
chore(wallet): remove unused lib methods (#22705)
Browse files Browse the repository at this point in the history
  • Loading branch information
josheleonard committed Mar 21, 2024
1 parent 57ebe09 commit 48766dd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 29 deletions.
12 changes: 6 additions & 6 deletions components/brave_wallet_ui/common/async/__mocks__/lib.ts
Expand Up @@ -32,12 +32,12 @@ export const onConnectHardwareWallet = (
})
}

export const getBalance = (): Promise<string> => {
return new Promise(async (resolve) => {
resolve('0')
})
}

export const translateToNftGateway = async (url: string | undefined) => {
return url
}

export async function isTokenPinningSupported(
token: BraveWallet.BlockchainToken
) {
return token.logo.includes('ipfs')
}
23 changes: 0 additions & 23 deletions components/brave_wallet_ui/common/async/lib.ts
Expand Up @@ -117,29 +117,6 @@ export const onConnectHardwareWallet = (
})
}

export async function isStrongPassword(value: string) {
const apiProxy = getAPIProxy()
return (await apiProxy.keyringService.isStrongPassword(value)).result
}

export async function getNFTMetadata(token: BraveWallet.BlockchainToken) {
const { jsonRpcService } = getAPIProxy()
if (token.coin === BraveWallet.CoinType.ETH) {
return await jsonRpcService.getERC721Metadata(
token.contractAddress,
token.tokenId,
token.chainId
)
} else if (token.coin === BraveWallet.CoinType.SOL) {
return await jsonRpcService.getSolTokenMetadata(
token.chainId,
token.contractAddress
)
}

return undefined
}

export async function isTokenPinningSupported(
token: BraveWallet.BlockchainToken
) {
Expand Down

0 comments on commit 48766dd

Please sign in to comment.