fix
This commit is contained in:
@@ -3,6 +3,8 @@ import { tokenStore, refreshAccessToken } from '@shared/api/tokenStore'
|
||||
import {
|
||||
getOrganizationWallets,
|
||||
getOrganizationBalances,
|
||||
getOrganizationMnemonic,
|
||||
getOrganizationSecretKeys,
|
||||
type OrgAmountRaw,
|
||||
type OrgWalletBalance,
|
||||
} from '@features/b2b'
|
||||
@@ -242,6 +244,28 @@ export async function getOrgWalletAddresses(): Promise<WalletAddress[]> {
|
||||
return result
|
||||
}
|
||||
|
||||
export async function getOrgMnemonic(): Promise<string> {
|
||||
const res = await getOrganizationMnemonic()
|
||||
return res.mnemonic
|
||||
}
|
||||
|
||||
export interface SecretKey {
|
||||
chain: string
|
||||
address: string
|
||||
derivationPath: string
|
||||
privateKey: string
|
||||
}
|
||||
|
||||
export async function getOrgSecretKeys(): Promise<SecretKey[]> {
|
||||
const keys = await getOrganizationSecretKeys()
|
||||
return (keys ?? []).map((k) => ({
|
||||
chain: k.chain,
|
||||
address: k.address,
|
||||
derivationPath: k.derivation_path,
|
||||
privateKey: k.private_key,
|
||||
}))
|
||||
}
|
||||
|
||||
export interface TokenInfo {
|
||||
chain: string
|
||||
symbol: string
|
||||
|
||||
Reference in New Issue
Block a user