This repository has been archived by the owner on Feb 9, 2024. It is now read-only.
Releases: use-ink/useink
Releases Β· use-ink/useink
[email protected]
Bug fix: Add correct exports for useink/core
[email protected]
Fix bug where core lib had bad exports
[email protected]
[email protected]
Ergonomics
Allow planck* helper functions in useink/utils
to receive an undefined api
argument
e.g. instead of doing:
if (contract?.api) {
console.log(planckToDecimalFormatted(balance, contract.api));
}
You can do this:
console.log(planckToDecimalFormatted(balance, contract?.api)); // returns undefined if `api` is undefined
Chore Updates
Change README copy path when deploying package. The README has not been showing up in npm.js
[email protected]
Add README to dist
[email protected]
New Features
Add formatting helpers
- Add
planckToDecimal
-> convert a balance to a decimal - Add
planckToDecimalFormatted
-> convert a balance to a decimal with the token symbol - Add
decimalToPlanck
-> convert a decimal to a planck
Add hooks
- Add
useChainDecimals()
-> Get the decimals for a chain. e.g.12
- Add
useTokenSymbol()
-> Get the chain token symbol. e.g.ROC
Add core functions
- Add
chainDecimals()
touseink/core
-> Get the decimals for a chain. e.g.12
- Add
chainTokenSymbol()
touseink/core
-> Get the chain token symbol. e.g.ROC
Feature Improvements
txPaymentInfo
- use spread operator to avoid the necessity to pass in multiple args
Maintenance
- Update polkadot-js dependencies
[email protected]
[email protected]
[email protected]
Add guard to decodeCallResult
for null Option return types
[email protected]
Chant useEvents
contract address type from AccountId
-> string
to make it easier to use.