Skip to content
This repository has been archived by the owner on Apr 28, 2023. It is now read-only.

Commit

Permalink
Fix problem with sending SUDT tokens to a long address.
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanmack committed Aug 3, 2021
1 parent 8619754 commit 256db9c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/SudtBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ export default class SudtBuilder extends Builder
// Create the SUDT output cell.
const typeScript = sudt.toTypeScript();
const lockScript = destinationAddress.toLockScript();
const sudtCell = new Cell(new Amount("142", AmountUnit.ckb), lockScript, typeScript, undefined, amount.toUInt128LE());
const sudtCell = new Cell(new Amount("9999999999", AmountUnit.ckb), lockScript, typeScript, undefined, amount.toUInt128LE());
sudtCell.capacity = sudtCell.occupiedCapacity();
outputCells.push(sudtCell);

// Calculate the required capacity. (SUDT cell + change cell minimum (61) + fee)
Expand Down

0 comments on commit 256db9c

Please sign in to comment.