aboutsummaryrefslogtreecommitdiffstats
path: root/packages/asset-buyer
diff options
context:
space:
mode:
authorBrandon Millman <brandon@0xproject.com>2018-12-04 07:07:23 +0800
committerGitHub <noreply@github.com>2018-12-04 07:07:23 +0800
commit2601d16efbb1e85eadca459e5dc64e78099e738a (patch)
tree2060d2f4ce483a4c9df581f0420a0e3d556abf1c /packages/asset-buyer
parente9fe7dcf54183416e114655595be4e565811d4ed (diff)
parent5edc3bfd33f4601f9edc6dc5073c790477f09849 (diff)
downloaddexon-sol-tools-2601d16efbb1e85eadca459e5dc64e78099e738a.tar
dexon-sol-tools-2601d16efbb1e85eadca459e5dc64e78099e738a.tar.gz
dexon-sol-tools-2601d16efbb1e85eadca459e5dc64e78099e738a.tar.bz2
dexon-sol-tools-2601d16efbb1e85eadca459e5dc64e78099e738a.tar.lz
dexon-sol-tools-2601d16efbb1e85eadca459e5dc64e78099e738a.tar.xz
dexon-sol-tools-2601d16efbb1e85eadca459e5dc64e78099e738a.tar.zst
dexon-sol-tools-2601d16efbb1e85eadca459e5dc64e78099e738a.zip
Merge pull request #1367 from 0xProject/fix/instant/dai
[asset-buyer][instant] support DAI in instant
Diffstat (limited to 'packages/asset-buyer')
-rw-r--r--packages/asset-buyer/CHANGELOG.json8
-rw-r--r--packages/asset-buyer/src/order_providers/standard_relayer_api_order_provider.ts8
2 files changed, 15 insertions, 1 deletions
diff --git a/packages/asset-buyer/CHANGELOG.json b/packages/asset-buyer/CHANGELOG.json
index 28d3270e8..4ff83018e 100644
--- a/packages/asset-buyer/CHANGELOG.json
+++ b/packages/asset-buyer/CHANGELOG.json
@@ -1,5 +1,13 @@
[
{
+ "version": "3.0.3",
+ "changes": [
+ {
+ "note": "Update SRA order provider to include Dai"
+ }
+ ]
+ },
+ {
"timestamp": 1543401373,
"version": "3.0.2",
"changes": [
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;
+ }
+ });
}
}