Skip to content

Commit

Permalink
Merge pull request #1116 from ankitkarna99/fix/notification-amount
Browse files Browse the repository at this point in the history
Fixed Incorrect Notification Amount on Policy Approve
  • Loading branch information
flashburst authored Dec 7, 2023
2 parents 9c0f457 + 6d7cd75 commit 92811db
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/hooks/usePurchasePolicy.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,16 @@ export const usePurchasePolicy = ({
notifyError(err, t`Could not approve ${liquidityTokenSymbol}`)
}

const feeFormatted = convertFromUnits(feeAmount, liquidityTokenDecimals)

try {
const onTransactionResult = async (tx) => {
TransactionHistory.push({
hash: tx.hash,
methodName: METHODS.POLICY_APPROVE,
status: STATUS.PENDING,
data: {
value,
value: feeFormatted,
tokenSymbol: liquidityTokenSymbol
}
})
Expand All @@ -186,15 +188,15 @@ export const usePurchasePolicy = ({
tx,
{
pending: getActionMessage(METHODS.POLICY_APPROVE, STATUS.PENDING, {
value,
value: feeFormatted,
tokenSymbol: liquidityTokenSymbol
}).title,
success: getActionMessage(METHODS.POLICY_APPROVE, STATUS.SUCCESS, {
value,
value: feeFormatted,
tokenSymbol: liquidityTokenSymbol
}).title,
failure: getActionMessage(METHODS.POLICY_APPROVE, STATUS.FAILED, {
value,
value: feeFormatted,
tokenSymbol: liquidityTokenSymbol
}).title
},
Expand Down

0 comments on commit 92811db

Please sign in to comment.