Skip to content
This repository was archived by the owner on Apr 11, 2023. It is now read-only.

Commit

Permalink
Merge branch 'main' into send_max
Browse files Browse the repository at this point in the history
  • Loading branch information
elmutt committed Nov 29, 2021
2 parents de7ace2 + 7493398 commit 385ec85
Show file tree
Hide file tree
Showing 10 changed files with 265 additions and 491 deletions.
7 changes: 7 additions & 0 deletions packages/caip/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# [@shapeshiftoss/caip-v1.4.2](https://github.com/shapeshift/lib/compare/@shapeshiftoss/caip-v1.4.1...@shapeshiftoss/caip-v1.4.2) (2021-11-29)


### Bug Fixes

* speed up invert of generated caip info ([#256](https://github.com/shapeshift/lib/issues/256)) ([b7d58e4](https://github.com/shapeshift/lib/commit/b7d58e4d69015066b2fe3b800178e2c76a57972f))

# [@shapeshiftoss/caip-v1.4.1](https://github.com/shapeshift/lib/compare/@shapeshiftoss/caip-v1.4.0...@shapeshiftoss/caip-v1.4.1) (2021-11-12)


Expand Down
2 changes: 1 addition & 1 deletion packages/caip/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/caip",
"version": "1.4.1",
"version": "1.4.2",
"description": "CAIP Implementation",
"homepage": "",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/caip/src/adapters/coingecko/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const generatedCAIP19ToCoingeckoMap = Object.values(adapters).reduce((acc, cur)
})) as Record<string, string>

const invert = <T extends Record<string, string>>(data: T) =>
Object.entries(data).reduce((acc, [k, v]) => ({ ...acc, [v]: k }), {})
Object.entries(data).reduce((acc, [k, v]) => ((acc[v] = k), acc), {} as Record<string, string>)

const generatedCoingeckoToCAIP19Map: Record<string, string> = invert(generatedCAIP19ToCoingeckoMap)

Expand Down
7 changes: 7 additions & 0 deletions packages/market-service/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# [@shapeshiftoss/market-service-v1.4.0](https://github.com/shapeshift/lib/compare/@shapeshiftoss/market-service-v1.3.2...@shapeshiftoss/market-service-v1.4.0) (2021-11-29)


### Features

* return dates as epoch times ([06de6b8](https://github.com/shapeshift/lib/commit/06de6b8cb684f4565de963c511e849be03906300))

# [@shapeshiftoss/market-service-v1.3.2](https://github.com/shapeshift/lib/compare/@shapeshiftoss/market-service-v1.3.1...@shapeshiftoss/market-service-v1.3.2) (2021-11-15)


Expand Down
2 changes: 1 addition & 1 deletion packages/market-service/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/market-service",
"version": "1.3.2",
"version": "1.4.0",
"description": "ShapeShift market data service",
"homepage": "",
"license": "MIT",
Expand Down
8 changes: 4 additions & 4 deletions packages/market-service/src/coingecko/coingecko.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,10 @@ describe('coingecko market service', () => {
]

const expected = [
{ date: new Date('2021-09-15T00:00:00.000Z'), price: 47135.43199562694 },
{ date: new Date('2021-09-14T00:00:00.000Z'), price: 45139.83396873267 },
{ date: new Date('2021-09-13T00:00:00.000Z'), price: 46195.21830082935 },
{ date: new Date('2021-09-12T00:00:00.000Z'), price: 45196.488277558245 }
{ date: new Date('2021-09-15T00:00:00.000Z').valueOf(), price: 47135.43199562694 },
{ date: new Date('2021-09-14T00:00:00.000Z').valueOf(), price: 45139.83396873267 },
{ date: new Date('2021-09-13T00:00:00.000Z').valueOf(), price: 46195.21830082935 },
{ date: new Date('2021-09-12T00:00:00.000Z').valueOf(), price: 45196.488277558245 }
]
mockedAxios.get.mockResolvedValue({ data: { prices: mockHistoryData } })
expect(await getPriceHistory(args)).toEqual(expected)
Expand Down
2 changes: 1 addition & 1 deletion packages/market-service/src/coingecko/coingecko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export class CoinGeckoMarketService implements MarketService {
)
return historyData?.prices?.map((data: [string, number]) => {
return {
date: new Date(data[0]),
date: data[0],
price: data[1]
}
})
Expand Down
2 changes: 2 additions & 0 deletions packages/swapper/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# [@shapeshiftoss/swapper-v1.11.11](https://github.com/shapeshift/lib/compare/@shapeshiftoss/swapper-v1.11.10...@shapeshiftoss/swapper-v1.11.11) (2021-11-24)

# [@shapeshiftoss/swapper-v1.11.10](https://github.com/shapeshift/lib/compare/@shapeshiftoss/swapper-v1.11.9...@shapeshiftoss/swapper-v1.11.10) (2021-11-22)


Expand Down
4 changes: 2 additions & 2 deletions packages/swapper/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/swapper",
"version": "1.11.10",
"version": "1.11.11",
"description": "TODO: description",
"repository": "https://github.com/shapeshift/lib",
"license": "MIT",
Expand All @@ -27,7 +27,7 @@
"axios": "^0.21.4",
"bignumber.js": "^9.0.1",
"retry-axios": "^2.6.0",
"web3": "1.6.0"
"web3": "^1.6.1"
},
"devDependencies": {
"@shapeshiftoss/asset-service": "^1.6.1",
Expand Down
720 changes: 239 additions & 481 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit 385ec85

Please sign in to comment.