mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-18 05:51:34 +02:00
* feat: Add Open CryptoPay for sending * bug: Fix sending Open CryptoPay for eth * feat: add transaction dismissal * style: remove print statements from OCP * feat: add support for Monero over OCP * bug: Hide "Add to Address Book" on OCP transactions * style: revert code style in send_view_model.dart * style: revert code style in send_view_model.dart * feat: set failure state if it fails to create an OCP transaction * Update lib/view_model/send/send_view_model.dart --------- Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
27 lines
652 B
Dart
27 lines
652 B
Dart
class OpenCryptoPayRequest {
|
|
final String receiverName;
|
|
final int expiry;
|
|
final String callbackUrl;
|
|
final String quote;
|
|
final Map<String, List<OpenCryptoPayQuoteAsset>> methods;
|
|
|
|
OpenCryptoPayRequest({
|
|
required this.receiverName,
|
|
required this.expiry,
|
|
required this.callbackUrl,
|
|
required this.quote,
|
|
required this.methods,
|
|
});
|
|
}
|
|
|
|
class OpenCryptoPayQuoteAsset {
|
|
final String symbol;
|
|
final String amount;
|
|
|
|
const OpenCryptoPayQuoteAsset(this.symbol, this.amount);
|
|
|
|
OpenCryptoPayQuoteAsset.fromJson(Map<String, dynamic> json)
|
|
: symbol = json['asset'] as String,
|
|
amount = json['amount'] as String;
|
|
}
|