Merge branch 'main' of github.com:hyle-team/zano_web3
This commit is contained in:
commit
e263faf387
1 changed files with 14 additions and 1 deletions
15
README.md
15
README.md
|
|
@ -395,4 +395,17 @@ const alias = "alias";
|
|||
|
||||
## Requirements
|
||||
|
||||
- Correct RPC URLs for the wallet and daemon.
|
||||
- Correct RPC URLs for the wallet and daemon.
|
||||
|
||||
# Shared logic
|
||||
## Usage
|
||||
### validateTokensInput util
|
||||
validateTokensInput function checks whether a numeric or string value can be used as an amount for an asset with the specified DP.
|
||||
|
||||
```typescript
|
||||
import { validateTokensInput } from "zano_web3/shared";
|
||||
|
||||
let isValidAmount = validateTokensInput("18446744.073709551615", 12); // true
|
||||
|
||||
isValidAmount = validateTokensInput("18446744.073709551616", 12); // false
|
||||
```
|
||||
Loading…
Add table
Reference in a new issue