zano_web3 8.2.0 → 8.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -1
- package/package.json +1 -1
- package/web/src/types.ts +1 -1
package/README.md
CHANGED
|
@@ -395,4 +395,17 @@ const alias = "alias";
|
|
|
395
395
|
|
|
396
396
|
## Requirements
|
|
397
397
|
|
|
398
|
-
- Correct RPC URLs for the wallet and daemon.
|
|
398
|
+
- Correct RPC URLs for the wallet and daemon.
|
|
399
|
+
|
|
400
|
+
# Shared logic
|
|
401
|
+
## Usage
|
|
402
|
+
### validateTokensInput util
|
|
403
|
+
validateTokensInput function checks whether a numeric or string value can be used as an amount for an asset with the specified DP.
|
|
404
|
+
|
|
405
|
+
```typescript
|
|
406
|
+
import { validateTokensInput } from "zano_web3/shared";
|
|
407
|
+
|
|
408
|
+
let isValidAmount = validateTokensInput("18446744.073709551615", 12); // true
|
|
409
|
+
|
|
410
|
+
isValidAmount = validateTokensInput("18446744.073709551616", 12); // false
|
|
411
|
+
```
|
package/package.json
CHANGED