fix issues with bond representation and bond purchase

Signed-off-by: Uncle Fatso <uncle.fatso@ghostchain.io>
This commit is contained in:
Uncle Fatso 2025-08-14 16:13:40 +03:00
parent 175d964b9f
commit 13a05bf0dd
Signed by: f4ts0
GPG Key ID: 565F4F2860226EBB
4 changed files with 9 additions and 6 deletions

View File

@ -1,7 +1,7 @@
{ {
"name": "ghost-dao-interface", "name": "ghost-dao-interface",
"private": true, "private": true,
"version": "0.2.4", "version": "0.2.5",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",

View File

@ -34,6 +34,7 @@ const BondConfirmModal = ({
spendAmountValue, spendAmountValue,
spendAmount, spendAmount,
receiveAmount, receiveAmount,
sender,
handleSettingsOpen, handleSettingsOpen,
isOpen, isOpen,
handleConfirmClose handleConfirmClose
@ -58,6 +59,7 @@ const BondConfirmModal = ({
spendAmountValue._value.toBigInt(), spendAmountValue._value.toBigInt(),
maxPrice, maxPrice,
recipientAddress, recipientAddress,
sender,
referral referral
); );

View File

@ -20,7 +20,7 @@ import DataRow from "../../../components/DataRow/DataRow";
import Paper from "../../../components/Paper/Paper"; import Paper from "../../../components/Paper/Paper";
import { useCurrentIndex } from "../../../hooks/staking"; import { useCurrentIndex } from "../../../hooks/staking";
import { useBalance } from "../../../hooks/tokens"; import { useBalance, useTokenSymbol } from "../../../hooks/tokens";
const BondInputArea = ({ const BondInputArea = ({
bond, bond,
@ -220,6 +220,7 @@ const BondInputArea = ({
receiveAmount={formatNumber(amountInBaseToken, formatDecimals)} receiveAmount={formatNumber(amountInBaseToken, formatDecimals)}
handleSettingsOpen={handleSettingsOpen} handleSettingsOpen={handleSettingsOpen}
isOpen={confirmOpen} isOpen={confirmOpen}
sender={address}
handleConfirmClose={() => handleConfirmClose()} handleConfirmClose={() => handleConfirmClose()}
/> />
</Box> </Box>

View File

@ -152,13 +152,13 @@ export const useLiveBonds = (chainId) => {
discount, discount,
displayName: getBondNameDisplayName(chainId, bondName, quoteTokenAddress), displayName: getBondNameDisplayName(chainId, bondName, quoteTokenAddress),
baseToken: { baseToken: {
name: quoteTokenSymbol, name: baseTokenSymbol,
purchaseUrl: getTokenPurchaseLink(chainId, ""), purchaseUrl: getTokenPurchaseLink(chainId, ""),
icons: ["FTSO"], icons: ["FTSO"],
tokenAddress: getTokenAddress(chainId, "FTSO") tokenAddress: getTokenAddress(chainId, "FTSO")
}, },
quoteToken: { quoteToken: {
name: quoteTokenName, name: quoteTokenSymbol,
purchaseUrl: getTokenPurchaseLink(chainId, quoteTokenAddress), purchaseUrl: getTokenPurchaseLink(chainId, quoteTokenAddress),
icons: getTokenIcons(chainId, quoteTokenAddress), icons: getTokenIcons(chainId, quoteTokenAddress),
decimals: quoteTokenDecimals, decimals: quoteTokenDecimals,
@ -261,7 +261,7 @@ export const useNotes = (chainId, address) => {
return { notes }; return { notes };
} }
export const purchaseBond = async (chainId, bondId, amount, maxPrice, user, referral) => { export const purchaseBond = async (chainId, bondId, amount, maxPrice, user, sender, referral) => {
const args = [ const args = [
bondId, bondId,
amount, amount,
@ -278,7 +278,7 @@ export const purchaseBond = async (chainId, bondId, amount, maxPrice, user, refe
chainId, chainId,
"deposit", "deposit",
args, args,
user, sender,
messages messages
); );
} }