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

feat: added crc support #1

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

feat: added crc support #1

wants to merge 4 commits into from

Conversation

onmax
Copy link
Member

@onmax onmax commented Jun 4, 2024

Also added support for smsApiToken in the /settle request

OasisApi.ts Outdated
Comment on lines 371 to 374
case OasisAsset.CRC:
decimals = 2; break;
Copy link
Member

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?

Copy link
Member Author

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

Copy link
Member

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.

OasisApi.ts Outdated Show resolved Hide resolved

script:post-response {
let data = res.getBody();
bru.setEnvVar("htlc_id",data.id);
Copy link
Member

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! 👍👍👍

@sisou sisou marked this pull request as ready for review July 26, 2024 08:03
onmax and others added 4 commits October 29, 2024 09:49
Also added support for smsApiToken in the `/settle` request
Also added post scripts to request to automatically update env variables after each call
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants