diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2018-12-04 02:42:25 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2018-12-04 02:42:25 +0800 |
commit | cd4241fac838254e7f9827b2ca39662a5e6489a8 (patch) | |
tree | 615b4ff3ed324e43a330aaf3aff63b0eea235f70 /packages/asset-buyer/src/order_providers/standard_relayer_api_order_provider.ts | |
parent | 57986c0e1e4f3fb79a78d13f09e5b55efa3b8547 (diff) | |
download | dexon-sol-tools-cd4241fac838254e7f9827b2ca39662a5e6489a8.tar dexon-sol-tools-cd4241fac838254e7f9827b2ca39662a5e6489a8.tar.gz dexon-sol-tools-cd4241fac838254e7f9827b2ca39662a5e6489a8.tar.bz2 dexon-sol-tools-cd4241fac838254e7f9827b2ca39662a5e6489a8.tar.lz dexon-sol-tools-cd4241fac838254e7f9827b2ca39662a5e6489a8.tar.xz dexon-sol-tools-cd4241fac838254e7f9827b2ca39662a5e6489a8.tar.zst dexon-sol-tools-cd4241fac838254e7f9827b2ca39662a5e6489a8.zip |
fix(asset-buyer): update SRA order provider to include DAI
Diffstat (limited to 'packages/asset-buyer/src/order_providers/standard_relayer_api_order_provider.ts')
-rw-r--r-- | packages/asset-buyer/src/order_providers/standard_relayer_api_order_provider.ts | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/packages/asset-buyer/src/order_providers/standard_relayer_api_order_provider.ts b/packages/asset-buyer/src/order_providers/standard_relayer_api_order_provider.ts index be1fc55d6..813c9923b 100644 --- a/packages/asset-buyer/src/order_providers/standard_relayer_api_order_provider.ts +++ b/packages/asset-buyer/src/order_providers/standard_relayer_api_order_provider.ts @@ -100,6 +100,12 @@ export class StandardRelayerAPIOrderProvider implements OrderProvider { } catch (err) { throw new Error(AssetBuyerError.StandardRelayerApiError); } - return _.map(response.records, item => item.assetDataB.assetData); + return _.map(response.records, item => { + if (item.assetDataA.assetData === takerAssetData) { + return item.assetDataB.assetData; + } else { + return item.assetDataA.assetData; + } + }); } } |