mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 11:59:30 +00:00
purchaseId -> id
because SimplexOrder qill have a quoteId, paymentId, and userId...
This commit is contained in:
parent
98a9804059
commit
8a1eee204b
5 changed files with 9 additions and 9 deletions
|
@ -11,7 +11,7 @@ class SimplexQuote {
|
|||
late final Decimal youPayFiatPrice;
|
||||
late final Decimal youReceiveCryptoAmount;
|
||||
|
||||
late final String purchaseId;
|
||||
late final String id;
|
||||
late final String receivingAddress;
|
||||
|
||||
late final bool buyWithFiat;
|
||||
|
@ -21,7 +21,7 @@ class SimplexQuote {
|
|||
required this.fiat,
|
||||
required this.youPayFiatPrice,
|
||||
required this.youReceiveCryptoAmount,
|
||||
required this.purchaseId,
|
||||
required this.id,
|
||||
required this.receivingAddress,
|
||||
required this.buyWithFiat});
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ class Simplex {
|
|||
{'ticker': 'USD', 'name': 'United States Dollar', 'image': ''}),
|
||||
youPayFiatPrice: Decimal.parse("100"),
|
||||
youReceiveCryptoAmount: Decimal.parse("1.0238917"),
|
||||
purchaseId: "someID",
|
||||
id: "someID",
|
||||
receivingAddress: '',
|
||||
buyWithFiat: true,
|
||||
);
|
||||
|
|
|
@ -79,7 +79,7 @@ class _BuyFormState extends ConsumerState<BuyForm> {
|
|||
{'ticker': 'USD', 'name': 'United States Dollar', 'image': ''}),
|
||||
youPayFiatPrice: Decimal.parse("100"),
|
||||
youReceiveCryptoAmount: Decimal.parse("1.0238917"),
|
||||
purchaseId: "someID",
|
||||
id: "someID",
|
||||
receivingAddress: '',
|
||||
buyWithFiat: true,
|
||||
); // TODO enum this or something
|
||||
|
@ -333,7 +333,7 @@ class _BuyFormState extends ConsumerState<BuyForm> {
|
|||
}
|
||||
|
||||
Future<void> previewQuote(SimplexQuote quote) async {
|
||||
// if (ref.read(simplexProvider).quote.purchaseId == "someID") {
|
||||
// if (ref.read(simplexProvider).quote.id == "someID") {
|
||||
// // TODO make a better way of detecting a default SimplexQuote
|
||||
bool shouldPop = false;
|
||||
unawaited(
|
||||
|
@ -358,7 +358,7 @@ class _BuyFormState extends ConsumerState<BuyForm> {
|
|||
youReceiveCryptoAmount: buyWithFiat
|
||||
? Decimal.parse("0.000420282") // dummy value
|
||||
: Decimal.parse(_buyAmountController.text), // Ternary for this
|
||||
purchaseId: "purchaseId", // anything; we get an ID back
|
||||
id: "id", // anything; we get an ID back
|
||||
receivingAddress: _receiveAddressController.text,
|
||||
buyWithFiat: buyWithFiat,
|
||||
);
|
||||
|
@ -485,7 +485,7 @@ class _BuyFormState extends ConsumerState<BuyForm> {
|
|||
{'ticker': 'USD', 'name': 'United States Dollar', 'image': ''}),
|
||||
youPayFiatPrice: Decimal.parse("100"),
|
||||
youReceiveCryptoAmount: Decimal.parse("1.0238917"),
|
||||
purchaseId: "someID",
|
||||
id: "someID",
|
||||
receivingAddress: '',
|
||||
buyWithFiat: true,
|
||||
); // TODO enum this or something
|
||||
|
|
|
@ -162,7 +162,7 @@ class _BuyQuotePreviewViewState extends State<BuyQuotePreviewView> {
|
|||
style: STextStyles.label(context),
|
||||
),
|
||||
Text(
|
||||
widget.quote.purchaseId,
|
||||
widget.quote.id,
|
||||
style: STextStyles.label(context).copyWith(
|
||||
color: Theme.of(context).extension<StackColors>()!.textDark,
|
||||
),
|
||||
|
|
|
@ -150,7 +150,7 @@ class SimplexAPI {
|
|||
fiat: quote.fiat,
|
||||
youPayFiatPrice: quote.youPayFiatPrice,
|
||||
youReceiveCryptoAmount: Decimal.parse(cryptoAmount),
|
||||
purchaseId: jsonArray['quote_id'] as String,
|
||||
id: jsonArray['quote_id'] as String,
|
||||
receivingAddress: quote.receivingAddress,
|
||||
buyWithFiat: quote.buyWithFiat,
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue