Updated extra id

This commit is contained in:
Godwin Asuquo 2022-10-12 18:59:04 +03:00
parent 0b72257dc6
commit 79df5126f6
2 changed files with 5 additions and 3 deletions

View file

@ -191,7 +191,7 @@ class ChangeNowExchangeProvider extends ExchangeProvider {
inputAddress: inputAddress, inputAddress: inputAddress,
amount: expectedSendAmount, amount: expectedSendAmount,
state: state, state: state,
extraId: extraId.isNotEmpty ? extraId : null, extraId: extraId,
expiredAt: expiredAt, expiredAt: expiredAt,
outputTransaction: outputTransaction); outputTransaction: outputTransaction);
} }

View file

@ -106,7 +106,7 @@ class SimpleSwapExchangeProvider extends ExchangeProvider {
final id = responseJSON['id'] as String; final id = responseJSON['id'] as String;
final inputAddress = responseJSON['address_from'] as String; final inputAddress = responseJSON['address_from'] as String;
final settleAddress = responseJSON['user_refund_address'] as String; final settleAddress = responseJSON['user_refund_address'] as String;
final extraIdTo = responseJSON['extraIdTo'] as String; final extraId = responseJSON['extra_id_from'] as String;
return Trade( return Trade(
id: id, id: id,
provider: description, provider: description,
@ -114,7 +114,7 @@ class SimpleSwapExchangeProvider extends ExchangeProvider {
to: _request.to, to: _request.to,
inputAddress: inputAddress, inputAddress: inputAddress,
refundAddress: settleAddress, refundAddress: settleAddress,
extraId: extraIdTo, extraId: extraId,
state: TradeState.created, state: TradeState.created,
amount: _request.amount, amount: _request.amount,
createdAt: DateTime.now(), createdAt: DateTime.now(),
@ -181,6 +181,7 @@ class SimpleSwapExchangeProvider extends ExchangeProvider {
final to = CryptoCurrency.fromString(toCurrency); final to = CryptoCurrency.fromString(toCurrency);
final inputAddress = responseJSON['address_from'] as String; final inputAddress = responseJSON['address_from'] as String;
final expectedSendAmount = responseJSON['expected_amount'].toString(); final expectedSendAmount = responseJSON['expected_amount'].toString();
final extraId = responseJSON['extra_id_from'] as String;
final status = responseJSON['status'] as String; final status = responseJSON['status'] as String;
final state = TradeState.deserialize(raw: status); final state = TradeState.deserialize(raw: status);
@ -188,6 +189,7 @@ class SimpleSwapExchangeProvider extends ExchangeProvider {
id: id, id: id,
from: from, from: from,
to: to, to: to,
extraId: extraId,
provider: description, provider: description,
inputAddress: inputAddress, inputAddress: inputAddress,
amount: expectedSendAmount, amount: expectedSendAmount,