-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: added crc support #1
base: main
Are you sure you want to change the base?
Conversation
OasisApi.ts
Outdated
case OasisAsset.CRC: | ||
decimals = 2; break; |
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.
Are we going to handle CRC with 2 decimals? AFAIK decimals in CRC are no longer used. Does Fastspot or OASIS ever use decimals for CRC?
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.
We won't use decimals, but in the UI we might add two decimals with 2 zeros like 5700.00
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.
Just know that this means that the library will return 500 CRC as 50000
, as it converts what the API gives to the smallest unit, and you are specifying here that the smallest unit is 2 decimals lower than the decimal dot.
|
||
script:post-response { | ||
let data = res.getBody(); | ||
bru.setEnvVar("htlc_id",data.id); |
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.
Oh, super cool, didn't know this is possible! 👍👍👍
Also added support for smsApiToken in the `/settle` request
Also added post scripts to request to automatically update env variables after each call
Also added support for smsApiToken in the
/settle
request