Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

Releases: use-ink/useink

[email protected]

26 Jun 18:50
Compare
Choose a tag to compare

Bug fix: Add correct exports for useink/core

[email protected]

26 Jun 18:43
39c481c
Compare
Choose a tag to compare

Fix bug where core lib had bad exports

[email protected]

14 Jun 22:24
c50c65d
Compare
Choose a tag to compare

[email protected]

13 Jun 22:56
Compare
Choose a tag to compare

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]

13 Jun 18:45
Compare
Choose a tag to compare

Add README to dist

[email protected]

13 Jun 01:08
Compare
Choose a tag to compare

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() to useink/core -> Get the decimals for a chain. e.g. 12
  • Add chainTokenSymbol() to useink/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]

09 Jun 22:40
Compare
Choose a tag to compare

Add Transfer function and hook

See docs here

  • Add transfer in useink/core
  • Add useTransfer in useink

[email protected]

07 Jun 21:56
Compare
Choose a tag to compare
  • Add bnToBalance helper function. See docs
  • Add txPaymentInfo to useink/core to fetch gas info for a message. See docs

[email protected]

06 Jun 18:47
Compare
Choose a tag to compare

Add guard to decodeCallResult for null Option return types

[email protected]

02 Jun 22:51
Compare
Choose a tag to compare

Chant useEvents contract address type from AccountId -> string to make it easier to use.