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 youPayFiatPrice;
|
||||||
late final Decimal youReceiveCryptoAmount;
|
late final Decimal youReceiveCryptoAmount;
|
||||||
|
|
||||||
late final String purchaseId;
|
late final String id;
|
||||||
late final String receivingAddress;
|
late final String receivingAddress;
|
||||||
|
|
||||||
late final bool buyWithFiat;
|
late final bool buyWithFiat;
|
||||||
|
@ -21,7 +21,7 @@ class SimplexQuote {
|
||||||
required this.fiat,
|
required this.fiat,
|
||||||
required this.youPayFiatPrice,
|
required this.youPayFiatPrice,
|
||||||
required this.youReceiveCryptoAmount,
|
required this.youReceiveCryptoAmount,
|
||||||
required this.purchaseId,
|
required this.id,
|
||||||
required this.receivingAddress,
|
required this.receivingAddress,
|
||||||
required this.buyWithFiat});
|
required this.buyWithFiat});
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ class Simplex {
|
||||||
{'ticker': 'USD', 'name': 'United States Dollar', 'image': ''}),
|
{'ticker': 'USD', 'name': 'United States Dollar', 'image': ''}),
|
||||||
youPayFiatPrice: Decimal.parse("100"),
|
youPayFiatPrice: Decimal.parse("100"),
|
||||||
youReceiveCryptoAmount: Decimal.parse("1.0238917"),
|
youReceiveCryptoAmount: Decimal.parse("1.0238917"),
|
||||||
purchaseId: "someID",
|
id: "someID",
|
||||||
receivingAddress: '',
|
receivingAddress: '',
|
||||||
buyWithFiat: true,
|
buyWithFiat: true,
|
||||||
);
|
);
|
||||||
|
|
|
@ -79,7 +79,7 @@ class _BuyFormState extends ConsumerState<BuyForm> {
|
||||||
{'ticker': 'USD', 'name': 'United States Dollar', 'image': ''}),
|
{'ticker': 'USD', 'name': 'United States Dollar', 'image': ''}),
|
||||||
youPayFiatPrice: Decimal.parse("100"),
|
youPayFiatPrice: Decimal.parse("100"),
|
||||||
youReceiveCryptoAmount: Decimal.parse("1.0238917"),
|
youReceiveCryptoAmount: Decimal.parse("1.0238917"),
|
||||||
purchaseId: "someID",
|
id: "someID",
|
||||||
receivingAddress: '',
|
receivingAddress: '',
|
||||||
buyWithFiat: true,
|
buyWithFiat: true,
|
||||||
); // TODO enum this or something
|
); // TODO enum this or something
|
||||||
|
@ -333,7 +333,7 @@ class _BuyFormState extends ConsumerState<BuyForm> {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> previewQuote(SimplexQuote quote) async {
|
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
|
// // TODO make a better way of detecting a default SimplexQuote
|
||||||
bool shouldPop = false;
|
bool shouldPop = false;
|
||||||
unawaited(
|
unawaited(
|
||||||
|
@ -358,7 +358,7 @@ class _BuyFormState extends ConsumerState<BuyForm> {
|
||||||
youReceiveCryptoAmount: buyWithFiat
|
youReceiveCryptoAmount: buyWithFiat
|
||||||
? Decimal.parse("0.000420282") // dummy value
|
? Decimal.parse("0.000420282") // dummy value
|
||||||
: Decimal.parse(_buyAmountController.text), // Ternary for this
|
: 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,
|
receivingAddress: _receiveAddressController.text,
|
||||||
buyWithFiat: buyWithFiat,
|
buyWithFiat: buyWithFiat,
|
||||||
);
|
);
|
||||||
|
@ -485,7 +485,7 @@ class _BuyFormState extends ConsumerState<BuyForm> {
|
||||||
{'ticker': 'USD', 'name': 'United States Dollar', 'image': ''}),
|
{'ticker': 'USD', 'name': 'United States Dollar', 'image': ''}),
|
||||||
youPayFiatPrice: Decimal.parse("100"),
|
youPayFiatPrice: Decimal.parse("100"),
|
||||||
youReceiveCryptoAmount: Decimal.parse("1.0238917"),
|
youReceiveCryptoAmount: Decimal.parse("1.0238917"),
|
||||||
purchaseId: "someID",
|
id: "someID",
|
||||||
receivingAddress: '',
|
receivingAddress: '',
|
||||||
buyWithFiat: true,
|
buyWithFiat: true,
|
||||||
); // TODO enum this or something
|
); // TODO enum this or something
|
||||||
|
|
|
@ -162,7 +162,7 @@ class _BuyQuotePreviewViewState extends State<BuyQuotePreviewView> {
|
||||||
style: STextStyles.label(context),
|
style: STextStyles.label(context),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
widget.quote.purchaseId,
|
widget.quote.id,
|
||||||
style: STextStyles.label(context).copyWith(
|
style: STextStyles.label(context).copyWith(
|
||||||
color: Theme.of(context).extension<StackColors>()!.textDark,
|
color: Theme.of(context).extension<StackColors>()!.textDark,
|
||||||
),
|
),
|
||||||
|
|
|
@ -150,7 +150,7 @@ class SimplexAPI {
|
||||||
fiat: quote.fiat,
|
fiat: quote.fiat,
|
||||||
youPayFiatPrice: quote.youPayFiatPrice,
|
youPayFiatPrice: quote.youPayFiatPrice,
|
||||||
youReceiveCryptoAmount: Decimal.parse(cryptoAmount),
|
youReceiveCryptoAmount: Decimal.parse(cryptoAmount),
|
||||||
purchaseId: jsonArray['quote_id'] as String,
|
id: jsonArray['quote_id'] as String,
|
||||||
receivingAddress: quote.receivingAddress,
|
receivingAddress: quote.receivingAddress,
|
||||||
buyWithFiat: quote.buyWithFiat,
|
buyWithFiat: quote.buyWithFiat,
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue