pass in a PublicKey instead of the string
This commit is contained in:
parent
526236e46f
commit
e3986a26a0
|
@ -10,6 +10,7 @@ import { ElementTitle } from './styles'
|
|||
import { InformationCircleIcon } from '@heroicons/react/outline'
|
||||
import Tooltip from './Tooltip'
|
||||
import { sleep } from '../utils'
|
||||
import { PublicKey } from '@solana/web3.js'
|
||||
|
||||
const BalancesTable = () => {
|
||||
const balances = useBalances()
|
||||
|
@ -28,7 +29,7 @@ const BalancesTable = () => {
|
|||
try {
|
||||
await settleAll(
|
||||
connection,
|
||||
programId,
|
||||
new PublicKey(programId),
|
||||
mangoGroup,
|
||||
marginAccount,
|
||||
markets,
|
||||
|
|
|
@ -89,7 +89,7 @@ const DepositModal = ({ isOpen, onClose }) => {
|
|||
} else {
|
||||
deposit(
|
||||
connection,
|
||||
programId,
|
||||
new PublicKey(programId),
|
||||
mangoGroup,
|
||||
marginAccount,
|
||||
wallet,
|
||||
|
|
|
@ -18,6 +18,7 @@ import Switch from './Switch'
|
|||
import Tooltip from './Tooltip'
|
||||
import { InformationCircleIcon } from '@heroicons/react/outline'
|
||||
import { Transition } from '@headlessui/react'
|
||||
import { PublicKey } from '@solana/web3.js'
|
||||
|
||||
const WithdrawModal = ({ isOpen, onClose }) => {
|
||||
const [inputAmount, setInputAmount] = useState('')
|
||||
|
@ -105,7 +106,7 @@ const WithdrawModal = ({ isOpen, onClose }) => {
|
|||
if (!includeBorrow) {
|
||||
withdraw(
|
||||
connection,
|
||||
programId,
|
||||
new PublicKey(programId),
|
||||
mangoGroup,
|
||||
marginAccount,
|
||||
wallet,
|
||||
|
@ -133,7 +134,7 @@ const WithdrawModal = ({ isOpen, onClose }) => {
|
|||
} else {
|
||||
borrowAndWithdraw(
|
||||
connection,
|
||||
programId,
|
||||
new PublicKey(programId),
|
||||
mangoGroup,
|
||||
marginAccount,
|
||||
wallet,
|
||||
|
|
Loading…
Reference in New Issue