aboutsummaryrefslogtreecommitdiffstats
path: root/packages
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
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')
-rw-r--r--packages/asset-buyer/CHANGELOG.json8
-rw-r--r--packages/asset-buyer/src/order_providers/standard_relayer_api_order_provider.ts8
-rw-r--r--packages/instant/src/data/asset_meta_data_map.ts2
3 files changed, 16 insertions, 2 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;
+ }
+ });
}
}
diff --git a/packages/instant/src/data/asset_meta_data_map.ts b/packages/instant/src/data/asset_meta_data_map.ts
index 0553be7f5..88611a8c0 100644
--- a/packages/instant/src/data/asset_meta_data_map.ts
+++ b/packages/instant/src/data/asset_meta_data_map.ts
@@ -195,7 +195,7 @@ export const assetMetaDataMap: ObjectMap<AssetMetaData> = {
'0xf47261b000000000000000000000000089d24a6b4ccb1b6faa2625fe562bdd9a23260359': {
assetProxyId: AssetProxyId.ERC20,
decimals: 18,
- primaryColor: '#F2B350',
+ primaryColor: '#DEA349',
symbol: 'dai',
name: 'Dai Stablecoin',
},