New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/add ton jettons #26
base: feat/ton
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty solid so far @ayelenmurano!!! It looks great!!
const op: TonOperation = { | ||
id: "", | ||
hash: "", | ||
type: "OUT", | ||
senders: [address], | ||
recipients: [recipient], | ||
accountId, | ||
value, | ||
fee: fees, | ||
blockHash: null, | ||
blockHeight: null, | ||
date: new Date(), | ||
extra: { | ||
// we don't know yet, will be patched in final operation | ||
lt: "", | ||
explorerHash: "", | ||
comment: comment, | ||
}, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whenever we do a token transfer, this tx does not really exists. I think there is a type "Fee" that you could use instead of OUT, as it is not really an OUT tx, but fees payment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mm yes, you are right Emma! I'll add it
const subAccount = findSubAccountById(a, t.subAccountId || ""); | ||
|
||
const amount = subAccount | ||
? toNano("0.05") // for commission fees, excess will be returned |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make this a constant somewhere, to make it clear what this value is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't find a good name for the constant. What do you think about maxComissionTokenTransferFee
? @emmanuelm41
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could be!
* The id and hash will be empty, because it will be replaced in broadcast * Adjust the body of the token transfer * Replace getSubAccount to findSubAccountById (an existent function)
11f60a9
to
102dbc5
Compare
β Checklist
npx changeset
was attached.π Description
Replace this text by a clear and concise description of what this pull request is about and why it is needed. Be sure to explain the problem you're addressing and the solution you're proposing.
For libraries, you can add a code sample of how to use it.
For bugfixes, you can explain the previous behavior and how it was fixed.
In case of visual features, please attach screenshots or video recordings to demonstrate the changes.
β Context
π§ Checklist for the PR Reviewers