fix issues with bond representation and bond purchase
Signed-off-by: Uncle Fatso <uncle.fatso@ghostchain.io>
This commit is contained in:
parent
175d964b9f
commit
13a05bf0dd
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "ghost-dao-interface",
|
||||
"private": true,
|
||||
"version": "0.2.4",
|
||||
"version": "0.2.5",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
@ -34,6 +34,7 @@ const BondConfirmModal = ({
|
||||
spendAmountValue,
|
||||
spendAmount,
|
||||
receiveAmount,
|
||||
sender,
|
||||
handleSettingsOpen,
|
||||
isOpen,
|
||||
handleConfirmClose
|
||||
@ -58,6 +59,7 @@ const BondConfirmModal = ({
|
||||
spendAmountValue._value.toBigInt(),
|
||||
maxPrice,
|
||||
recipientAddress,
|
||||
sender,
|
||||
referral
|
||||
);
|
||||
|
||||
|
@ -20,7 +20,7 @@ import DataRow from "../../../components/DataRow/DataRow";
|
||||
import Paper from "../../../components/Paper/Paper";
|
||||
|
||||
import { useCurrentIndex } from "../../../hooks/staking";
|
||||
import { useBalance } from "../../../hooks/tokens";
|
||||
import { useBalance, useTokenSymbol } from "../../../hooks/tokens";
|
||||
|
||||
const BondInputArea = ({
|
||||
bond,
|
||||
@ -220,6 +220,7 @@ const BondInputArea = ({
|
||||
receiveAmount={formatNumber(amountInBaseToken, formatDecimals)}
|
||||
handleSettingsOpen={handleSettingsOpen}
|
||||
isOpen={confirmOpen}
|
||||
sender={address}
|
||||
handleConfirmClose={() => handleConfirmClose()}
|
||||
/>
|
||||
</Box>
|
||||
|
@ -152,13 +152,13 @@ export const useLiveBonds = (chainId) => {
|
||||
discount,
|
||||
displayName: getBondNameDisplayName(chainId, bondName, quoteTokenAddress),
|
||||
baseToken: {
|
||||
name: quoteTokenSymbol,
|
||||
name: baseTokenSymbol,
|
||||
purchaseUrl: getTokenPurchaseLink(chainId, ""),
|
||||
icons: ["FTSO"],
|
||||
tokenAddress: getTokenAddress(chainId, "FTSO")
|
||||
},
|
||||
quoteToken: {
|
||||
name: quoteTokenName,
|
||||
name: quoteTokenSymbol,
|
||||
purchaseUrl: getTokenPurchaseLink(chainId, quoteTokenAddress),
|
||||
icons: getTokenIcons(chainId, quoteTokenAddress),
|
||||
decimals: quoteTokenDecimals,
|
||||
@ -261,7 +261,7 @@ export const useNotes = (chainId, address) => {
|
||||
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 = [
|
||||
bondId,
|
||||
amount,
|
||||
@ -278,7 +278,7 @@ export const purchaseBond = async (chainId, bondId, amount, maxPrice, user, refe
|
||||
chainId,
|
||||
"deposit",
|
||||
args,
|
||||
user,
|
||||
sender,
|
||||
messages
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user