Skip to content
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

Improve Reimbursed Dialog box #185

Conversation

gonzamontiel
Copy link
Contributor

@gonzamontiel gonzamontiel commented Jun 6, 2023

Still a draft because I need to fetch currency_to_usd() and usd_to_currency() from oracle pallet, and they are not yet accessible through RPC.

@gonzamontiel gonzamontiel linked an issue Jun 6, 2023 that may be closed by this pull request
@netlify
Copy link

netlify bot commented Jun 6, 2023

Deploy Preview for rococo-souffle-a625f5 ready!

Name Link
🔨 Latest commit 7e71afa
🔍 Latest deploy log https://app.netlify.com/sites/rococo-souffle-a625f5/deploys/64b6742df649200008473c15
😎 Deploy Preview https://deploy-preview-185--rococo-souffle-a625f5.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@gonzamontiel gonzamontiel changed the title Improve Reimburses Dialog box Improve Reimbursed Dialog box Jun 6, 2023
@gonzamontiel
Copy link
Contributor Author

I've updated the code to use the oracle pallet, while the types are correct now, we need to wait that the nodes are redeployed to be able to test it. I mark it ready but please don't review it yet.

@gonzamontiel gonzamontiel marked this pull request as ready for review June 7, 2023 13:57
@github-actions
Copy link

github-actions bot commented Jun 7, 2023

yarn.lock changes

Click to toggle table visibility
Name Status Previous Current
@pendulum-chain/api-derive UPDATED 0.3.1 0.3.2
@pendulum-chain/api UPDATED 0.3.1 0.3.2
@pendulum-chain/type-definitions UPDATED 0.3.1 0.3.2
@pendulum-chain/types UPDATED 0.3.1 0.3.2

@gonzamontiel
Copy link
Contributor Author

I am blocked in this one by an error that I couldn't solve today. The error appears trying to call
api.rpc.oracle.currencyToUsd(amount, currency). I am not able to build an amount that the functions is happey about.
I tried passing a number, a BN, building a BalanceWrapper {amount: Balance}, a string, etc. And everytime a similar error appears, which I attach. When, instead of an integer, I pass a string representing the number, the exact same error appears.

Screenshot from 2023-06-08 14 53 42

@gonzamontiel gonzamontiel requested a review from ebma July 13, 2023 15:08
@ebma
Copy link
Member

ebma commented Jul 13, 2023

@gonzamontiel did you manage to fix the issue you described above? I still see the same error messages.

@gonzamontiel
Copy link
Contributor Author

@gonzamontiel did you manage to fix the issue you described above? I still see the same error messages.

Well now that you say it, I didn't get that error, but now I get:

TypeError: Cannot read properties of undefined (reading 'currencyToUsd')
    at getExchangeRate (oracle.tsx:26:55)
    at Object.__ (TransferDialog.tsx:238:5)
    at w (index.js:492:18)
    at Array.forEach (<anonymous>)
    at b (index.js:419:38)

which is weird because the types are updated.

@ebma
Copy link
Member

ebma commented Jul 14, 2023

But you are testing on Foucoco right? Or did you select another network?

@gonzamontiel
Copy link
Contributor Author

But you are testing on Foucoco right? Or did you select another network?

Indeed, testing in Foucoco.

@ebma
Copy link
Member

ebma commented Jul 14, 2023

But when I use the deploy preview page, and navigate to a 'reimbursed' redeem request in the transfers page, I see the following error. Is it different for you?
image

@nejcm nejcm closed this Aug 29, 2023
@nejcm nejcm deleted the 104-add-inconvenience-compensation-in-the-reimburse-dialog-box branch August 29, 2023 05:02
@ebma ebma restored the 104-add-inconvenience-compensation-in-the-reimburse-dialog-box branch August 30, 2023 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants