Skip to content

Commit

Permalink
fix wrong amount in multi transfer
Browse files Browse the repository at this point in the history
  • Loading branch information
juliancwirko committed Jul 9, 2023
1 parent 74ea2ef commit 1c1a4af
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### [0.14.1](https://github.com/xdevguild/buildo-begins/releases/tag/v0.14.1) (2023-07-09)
- fix wrong amount of Meta ESDT sent in multi-transfer operation

### [0.14.0](https://github.com/xdevguild/buildo-begins/releases/tag/v0.14.0) (2023-07-08)
- add multiple token transfer: `buildo-begins multi-transfer`
- update dependencies
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"engines": {
"node": "^14.13.1 || >=16.0.0"
},
"version": "0.14.0",
"version": "0.14.1",
"description": "MultiversX blockchain CLI helper tools (protocol, API and smart contracts interaction, also helper tools)",
"bin": {
"buildo-begins": "./build/index.js"
Expand Down
4 changes: 3 additions & 1 deletion src/multi-transfer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export const multiTransfer = async () => {
nonce: number;
ticker: string;
type: string;
decimals: number;
}>(`${publicApi[chain]}/nfts/${tokenId.trim()}`, {
headers: {
'Content-Type': 'application/json',
Expand All @@ -101,10 +102,11 @@ export const multiTransfer = async () => {
nonce = tokenOnNetwork?.data?.nonce;
collectionTicker = tokenOnNetwork?.data?.ticker;
tokenType = tokenOnNetwork?.data?.type;
decimals = tokenOnNetwork?.data?.decimals;
}

const checkAmount = () => {
if (!amount) {
if (!amount || Number.isNaN(parseInt(amount))) {
console.log(
'The input data is broken, please double check your input data.'
);
Expand Down

0 comments on commit 1c1a4af

Please sign in to comment.