-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: keystone approvals, bridge amount too low, spend approval dollar value #85
Conversation
@@ -212,7 +212,7 @@ export const BridgeForm = ({ | |||
const [neededGas, setNeededGas] = useState(0n); | |||
|
|||
useEffect(() => { | |||
if (minimum && amount.lt(minimum)) { | |||
if (minimum && amount.gt(0) && amount.lt(minimum)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't show the "Amount is too low" error if amount is 0
return await this.#walletService.sign( | ||
signingData.data, | ||
network, | ||
action.tabId |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pass tabId
, so the signature request can later be paired with the window that initiated the request
(diffItemValue as TokenUnit).toDisplay({ asNumber: true }) * | ||
Number(approval.usdPrice) | ||
), | ||
usdPrice: approval.usdPrice, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was being multiplied unnecessarily - I thought usdPrice
is the price of a single token here, but it's the USD value of the whole approval.
Description
Fixes these issues: