fix account naming when new sub account

This commit is contained in:
Tyler Shipe 2021-08-17 17:52:53 -04:00
parent deda8e58d6
commit b3424df63e
3 changed files with 6 additions and 2 deletions

View File

@ -64,6 +64,7 @@ const NewAccount: FunctionComponent<NewAccountProps> = ({
deposit({
amount: inputAmount,
fromTokenAcc: selectedAccount.account,
accountName: name,
})
.then(async (response) => {
await sleep(1000)

View File

@ -6,10 +6,12 @@ export async function deposit({
amount,
fromTokenAcc,
mangoAccount,
accountName,
}: {
amount: number
fromTokenAcc: TokenAccount
mangoAccount?: MangoAccount
accountName?: string
}) {
const mangoGroup = useMangoStore.getState().selectedMangoGroup.current
const wallet = useMangoStore.getState().wallet.current
@ -34,7 +36,8 @@ export async function deposit({
mangoGroup.rootBankAccounts[tokenIndex].nodeBankAccounts[0].publicKey,
mangoGroup.rootBankAccounts[tokenIndex].nodeBankAccounts[0].vault,
fromTokenAcc.publicKey,
Number(amount)
Number(amount),
accountName
)
}
}

View File

@ -995,7 +995,7 @@
"@blockworks-foundation/mango-client@git+https://github.com/blockworks-foundation/mango-client-v3.git":
version "3.0.4"
resolved "git+https://github.com/blockworks-foundation/mango-client-v3.git#cf10321a0578cedcbb751a7269b6da3396d6efc6"
resolved "git+https://github.com/blockworks-foundation/mango-client-v3.git#da6c20c0db4c5f358b4f68f8ce8b91d0fe2c3722"
dependencies:
"@project-serum/serum" "0.13.55"
"@project-serum/sol-wallet-adapter" "^0.2.0"