Skip to content

Commit

Permalink
fix: create a failed transfer_all transaction (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
osipov-mit authored Jun 4, 2024
1 parent 9d28583 commit c9de021
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/src/helpers/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export async function getOperations(
type: OpType.TRANSFER,
status: opStatus,
account: new AccountIdentifier(dest),
amount: new Amount(amount.toString(), currency),
amount: new Amount(amount === null ? '0' : amount.toString(), currency),
}),
);
operations.push(
Expand All @@ -59,7 +59,7 @@ export async function getOperations(
type: OpType.TRANSFER,
status: opStatus,
account: new AccountIdentifier(src),
amount: new Amount(amount.clone().neg().toString(), currency),
amount: new Amount(amount === null ? '0' : amount.clone().neg().toString(), currency),
related_operations: [new OperationIdentifier(operations.length - 1)],
}),
);
Expand Down

0 comments on commit c9de021

Please sign in to comment.