mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-11-25 11:03:55 +01:00
* 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>
14 lines
484 B
Dart
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];
|