Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@archethicjs/sdk",
"version": "1.21.3",
"version": "1.21.4",
"description": "Archethic Javascript SDK",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions src/transaction_builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ export default class TransactionBuilder {
addUCOTransfer(to: string | Uint8Array, amount: bigint) {
to = maybeHexToUint8Array(to);

if (amount <= 0) {
throw new Error("UCO transfer amount must be a positive number");
if (amount < 0) {
throw new Error("UCO transfer amount cannot be negative");
}

this.data.ledger.uco.transfers.push({ to, amount });
Expand Down