Skip to content

Coloured coin support in Tapyrus Qt send coins page#202

Closed
Naviabheeman wants to merge 9 commits intochaintope:masterfrom
Naviabheeman:77_ColoredCoinGUI_3
Closed

Coloured coin support in Tapyrus Qt send coins page#202
Naviabheeman wants to merge 9 commits intochaintope:masterfrom
Naviabheeman:77_ColoredCoinGUI_3

Conversation

@Naviabheeman
Copy link
Contributor

Add new field "Token" to show the token name when the address entered in the "Address" text is a colored address. The token name is auto populated when an address is entered. Unit changes to TOKEN.

Naviabheeman and others added 9 commits March 20, 2026 18:36
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>
@Naviabheeman
Copy link
Contributor Author

implemented in #396

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.

1 participant