Files
hash-wallet/cw_core/lib/currencies_with_memo.dart
T
1d652c76aa feat: Add memo support for swap (#3229)
* feat: Add memo support for swap

* fix: Error on swap page select receiver bottomsheet when picking receiveing currency that's not a wallet type

* feat: exclude providers that do not support memo when receive currency needs it, also show passed memo in confirmation and trade history sheets

* fix: overflow for destination tag on swap confirmation

* Update lib/view_model/exchange/exchange_view_model.dart [skip ci]

* Update lib/exchange/provider/trocador_exchange_provider.dart [skip ci]

---------

Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
2026-05-20 20:09:34 +02:00

14 lines
484 B
Dart

import 'package:cw_core/crypto_currency.dart';
enum MemoLabelType { destinationTag, memo }
const Map<CryptoCurrency, MemoLabelType> _currenciesRequiringMemo = {
CryptoCurrency.xrp: MemoLabelType.destinationTag,
CryptoCurrency.xlm: MemoLabelType.memo,
CryptoCurrency.ton: MemoLabelType.memo,
CryptoCurrency.eos: MemoLabelType.memo,
CryptoCurrency.hbar: MemoLabelType.memo,
};
MemoLabelType? memoLabelTypeFor(CryptoCurrency currency) => _currenciesRequiringMemo[currency];