stack_wallet/lib/models/buy/simplex/simplex.dart
2024-05-27 18:01:41 -06:00

65 lines
1.8 KiB
Dart

/*
* This file is part of Stack Wallet.
*
* Copyright (c) 2023 Cypher Stack
* All Rights Reserved.
* The code is distributed under GPLv3 license, see LICENSE file for details.
* Generated by Cypher Stack on 2023-05-26
*
*/
import 'package:decimal/decimal.dart';
import '../response_objects/crypto.dart';
import '../response_objects/fiat.dart';
import '../response_objects/order.dart';
import '../response_objects/quote.dart';
class Simplex {
List<Crypto> supportedCryptos = [];
List<Fiat> supportedFiats = [];
SimplexQuote quote = SimplexQuote(
crypto: Crypto.fromJson({'ticker': 'BTC', 'name': 'Bitcoin', 'image': ''}),
fiat: Fiat.fromJson(
{'ticker': 'USD', 'name': 'United States Dollar', 'image': ''},
),
youPayFiatPrice: Decimal.parse("100"),
youReceiveCryptoAmount: Decimal.parse("1.0238917"),
id: "someID",
receivingAddress: '',
buyWithFiat: true,
);
SimplexOrder order = SimplexOrder(
quote: SimplexQuote(
crypto:
Crypto.fromJson({'ticker': 'BTC', 'name': 'Bitcoin', 'image': ''}),
fiat: Fiat.fromJson(
{'ticker': 'USD', 'name': 'United States Dollar', 'image': ''},
),
youPayFiatPrice: Decimal.parse("100"),
youReceiveCryptoAmount: Decimal.parse("1.0238917"),
id: "someID",
receivingAddress: '',
buyWithFiat: true,
),
orderId: 'aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee',
paymentId: 'aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee',
userId: 'aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee',
);
void updateSupportedCryptos(List<Crypto> newCryptos) {
supportedCryptos = newCryptos;
}
void updateSupportedFiats(List<Fiat> newFiats) {
supportedFiats = newFiats;
}
void updateQuote(SimplexQuote newQuote) {
quote = newQuote;
}
void updateOrder(SimplexOrder newOrder) {
order = newOrder;
}
}