extra id for simple swap

This commit is contained in:
Godwin Asuquo 2022-10-03 16:49:29 +03:00
parent 40e4f7de1f
commit 0b72257dc6
2 changed files with 3 additions and 2 deletions

View file

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

View file

@ -106,7 +106,7 @@ class SimpleSwapExchangeProvider extends ExchangeProvider {
final id = responseJSON['id'] as String;
final inputAddress = responseJSON['address_from'] as String;
final settleAddress = responseJSON['user_refund_address'] as String;
final extraIdTo = responseJSON['extraIdTo'] as String;
return Trade(
id: id,
provider: description,
@ -114,6 +114,7 @@ class SimpleSwapExchangeProvider extends ExchangeProvider {
to: _request.to,
inputAddress: inputAddress,
refundAddress: settleAddress,
extraId: extraIdTo,
state: TradeState.created,
amount: _request.amount,
createdAt: DateTime.now(),