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

Read the minimum amount of BTC deposit from the SDK #234

Closed
Tracked by #146
kkosiorowska opened this issue Feb 12, 2024 · 0 comments · Fixed by #303
Closed
Tracked by #146

Read the minimum amount of BTC deposit from the SDK #234

kkosiorowska opened this issue Feb 12, 2024 · 0 comments · Fixed by #303
Assignees
Labels

Comments

@kkosiorowska
Copy link
Contributor

kkosiorowska commented Feb 12, 2024

Currently, the minimum amount of deposit for dApp is read from the constant BITCOIN_MIN_AMOUNT. We should take it from the SDK. Let's update this value.

Originally posted by @nkuba in #217 (comment)

@nkuba nkuba mentioned this issue Feb 12, 2024
r-czajkowski added a commit that referenced this issue Apr 16, 2024
Closes #234
Closes #336

This PR reads the minimum amount of BTC deposit from the SDK and saves
it in the redux store.

### What has been done: 

- Fetch the minimum amount of BTC deposit from the SDK
- Create a special hook `useFetchSdkData` to load all needed data from
the SDK
- Set desired decimals for Bitcoin currency manually. Previously, we
determined the number of desired places based on the minimum stake
amount. However, now we are not able to do it this way because the data
from the SDK is loaded after connecting the accounts.
- Standardization of types in the form. Use a `bigint` for
`tokenBalnce`.
- Extend `CurrencyBalance` to pass the amount in `bigint`



One note: the contracts have not been deployed yet. Therefore, an error
will appear in the console `TypeError: this.instance.minDepositAmount is
not a function` However, When the contracts are re-deployed I will
update the code and the error will disappear.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant