diff --git a/frontend/src/app/core/pages/contracts-create/index.tsx b/frontend/src/app/core/pages/contracts-create/index.tsx index 094a22b5..8062110b 100644 --- a/frontend/src/app/core/pages/contracts-create/index.tsx +++ b/frontend/src/app/core/pages/contracts-create/index.tsx @@ -112,7 +112,7 @@ export const ContractsCreate: React.FC = () => { compoundType === 'Compound interest' ? compound : 0 ), yield_rate: BigInt(yieldRate), - min_deposit: BigInt(Number(data.min_deposit || 0)), + min_deposit: BigInt(Number(data.min_deposit || 0) * 10000000), penalty_rate: BigInt(penaltyRate), allowance_period: latestSequenceLedger + allowancePeriod, signerSecret: vault.wallet.key.publicKey, diff --git a/frontend/src/app/core/pages/contracts-detail/index.tsx b/frontend/src/app/core/pages/contracts-detail/index.tsx index 51073604..898a5d17 100644 --- a/frontend/src/app/core/pages/contracts-detail/index.tsx +++ b/frontend/src/app/core/pages/contracts-detail/index.tsx @@ -56,7 +56,7 @@ export const ContractsDetail: React.FC = () => { const loadContractData = useCallback(async (): Promise => { if (profile && contract) { - const wallet = profile.vault.wallet.key.publicKey + const wallet = profile.vault?.wallet.key.publicKey let timeLeft = contractData?.timeLeft @@ -189,6 +189,7 @@ export const ContractsDetail: React.FC = () => { withdraw_amount: contractData?.position || 0, contract_id: contract.id, }) + getHistory(contract.id).then(history => setHistory(history)) await getProfile() toast({ title: 'Withdraw success!', @@ -243,7 +244,7 @@ export const ContractsDetail: React.FC = () => { onSubmitDeposit={onSubmitDeposit} loading={loadingPosition} contract={contract} - userAccount={profile?.vault.wallet.key.publicKey} + userAccount={profile?.vault?.wallet?.key.publicKey} isDepositing={isDepositing} isWithdrawing={isWithdrawing} contractData={contractData} diff --git a/frontend/src/components/templates/contracts-detail/components/deposit/index.tsx b/frontend/src/components/templates/contracts-detail/components/deposit/index.tsx index e6a2fe1b..48ed2004 100644 --- a/frontend/src/components/templates/contracts-detail/components/deposit/index.tsx +++ b/frontend/src/components/templates/contracts-detail/components/deposit/index.tsx @@ -74,6 +74,7 @@ export const Deposit: React.FC = ({ py="0.25rem" alignItems="center" gap="0.5rem" + stroke="black" _dark={{ bg: 'black.800', color: 'white' }} > {contract?.asset?.image ? (