Skip to content
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

Open
wants to merge 22 commits into
base: feat/ton
Choose a base branch
from
Open

Feat/add ton jettons #26

wants to merge 22 commits into from

Conversation

emmanuelm41
Copy link
Member

βœ… Checklist

  • npx changeset was attached.
  • Covered by automatic tests.
  • Impact of the changes:
    • ...

πŸ“ 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

  • JIRA or GitHub link:

🧐 Checklist for the PR Reviewers

  • The code aligns with the requirements described in the linked JIRA or GitHub issue.
  • The PR description clearly documents the changes made and explains any technical trade-offs or design decisions.
  • There are no undocumented trade-offs, technical debt, or maintainability issues.
  • The PR has been tested thoroughly, and any potential edge cases have been considered and handled.
  • Any new dependencies have been justified and documented.
  • Performance considerations have been taken into account. (changes have been profiled or benchmarked if necessary)

Copy link
Member Author

@emmanuelm41 emmanuelm41 left a 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!!

libs/coin-modules/coin-ton/src/cli-transaction.ts Outdated Show resolved Hide resolved
libs/coin-modules/coin-ton/src/js-estimateMaxSpendable.ts Outdated Show resolved Hide resolved
libs/coin-modules/coin-ton/src/js-prepareTransaction.ts Outdated Show resolved Hide resolved
libs/coin-modules/coin-ton/src/js-prepareTransaction.ts Outdated Show resolved Hide resolved
libs/coin-modules/coin-ton/src/js-signOperation.ts Outdated Show resolved Hide resolved
Comment on lines +91 to +108
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,
},
};
Copy link
Member Author

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

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
Copy link
Member Author

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?

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could be!

libs/coin-modules/coin-ton/src/utils.ts Show resolved Hide resolved
apps/ledger-live-desktop/cryptoassets.md Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants