Skip to content

Token send and receive#396

Open
Naviabheeman wants to merge 5 commits intochaintope:masterfrom
Naviabheeman:TokenSendAndReceive
Open

Token send and receive#396
Naviabheeman wants to merge 5 commits intochaintope:masterfrom
Naviabheeman:TokenSendAndReceive

Conversation

@Naviabheeman
Copy link
Contributor

Enable sending and receiving colored coins from tapyrus-qt
In send coins tab

  • address can now be colored address. Then the token type is populated automatically.
  • amount spin control is changed to increment in counts of 1 when the token is selected.
  • SendCoinRecepient class needs to store color id

In receive coins tab

  • amount spin controls shared with send tab
  • color id is added to received payments table

Copy link
Contributor

@azuchi azuchi left a comment

Choose a reason for hiding this comment

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

1efe041

This Mac fix is ​​unrelated to Qt, so please submit it as a separate pull request.

Naviabheeman and others added 5 commits March 24, 2026 13:31
Remove outdated send token screenshot from documentation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… UI visibility

- walletmodel.cpp prepareTransaction: detect colored recipients, set
  m_colorTxType=TRANSFER and m_colorId in coin control, check token
  balance instead of TPC balance for colored sends
- sendcoinsdialog.cpp: fix operator precedence bug in ternary for amount
  formatting (was: "<b>" + bool ? A : B, now: "<b>" + (bool ? A : B))
- sendcoinsentry.cpp: skip dust check for token addresses (token outputs
  have nValue=0, dust threshold does not apply); hide Token label row
  when address is TPC, show it when colored; add null guard in
  getAvailableBalance

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- receivecoinsdialog.ui: add Token combobox row (before Amount) so user
  can select TPC or a specific token type when generating a receive address
- receivecoinsdialog.cpp: populate token combo from getIssuedTokens()
  with type icons; switch reqAmount unit to TOKEN when a token is
  selected; on Request Payment generate CColorKeyID address from a new
  key + selected colorId and register it in the address book; clear()
  resets token selection to TPC; refresh combo on tokenAddressBookChanged
- receiverequestdialog.cpp: show Token colorId line in payment info;
  format amount with TOKEN unit for token requests
- recentrequeststablemodel.cpp: format Amount column with TOKEN unit for
  token payment requests

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- BitcoinAmountField: add setTokenMode() and m_tokenMode flag so
  setEnabled() never re-enables the unit combobox while in token mode;
  set singleStep=1 for tokens to prevent unit-scaled spinning
- BitcoinAmountField: add setUnitEnabled() helper
- Remove TOKEN from availableUnits() dropdown; retain for formatting
- ReceiveCoinsDialog: replace token combobox with TPC/Token radio
  buttons; disable amount unit selector for tokens; enforce NFT rules
  (amount=1, disable field, block request if already owned, tooltip);
  add Token column to payment history table with raw integer amounts
- SendCoinsEntry: enforce same NFT rules on send page; populate
  recipient.colorid from address in getValue() so prepareTransaction
  uses the correct token balance; disable subtract-fee checkbox for tokens
- ReceiveRequestDialog: fix operator precedence bug in colorid check

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants