Skip to content

Commit

Permalink
Update eth-block-tracker dep and bump version (#24)
Browse files Browse the repository at this point in the history
* Update blocktracker and bump version
* Downgrade eth-block-tracker to v3 to avoid breaking changes
* Try with the previous version
* back to 3.0.1
* add fetch-mocka for collectible tokenURI tests
  • Loading branch information
Bruno Barbieri authored and MajorLift committed Oct 11, 2023
1 parent 0d537af commit 1b70dc5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gaba",
"version": "1.0.0-beta.41",
"version": "1.0.0-beta.42",
"description": "Collection of platform-agnostic modules for creating secure data models for cryptocurrency wallets",
"license": "MIT",
"scripts": {
Expand Down Expand Up @@ -72,7 +72,7 @@
},
"dependencies": {
"await-semaphore": "^0.1.3",
"eth-block-tracker": "git://github.com/metamask/eth-block-tracker.git#3.0.1-subscription-fix",
"eth-block-tracker": "^3.0.1",
"eth-contract-metadata": "github:estebanmino/eth-contract-metadata#master",
"eth-json-rpc-infura": "^3.1.2",
"eth-keyring-controller": "^4.0.0",
Expand Down
3 changes: 3 additions & 0 deletions src/AssetsController.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ describe('AssetsController', () => {
});

it('should add collectible with tokenURI, metadata and enumerable support', async () => {
getOnce('https://api.godsunchained.com/card/1', () => ({
body: JSON.stringify({ image: 'https://api.godsunchained.com/v0/image/7', name: 'Broken Harvester' })
}));
/* tslint:disable-next-line:no-unused-expression */
new ComposableController([assetsController, assetsContract, network, preferences]);
assetsContract.configure({ provider: MAINNET_PROVIDER });
Expand Down
3 changes: 3 additions & 0 deletions src/AssetsDetectionController.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ describe('AssetsDetectionController', () => {
});

it('should detect enumerable collectibles correctly', async () => {
getOnce('https://api.godsunchained.com/card/0', () => ({
body: JSON.stringify({ image: 'https://api.godsunchained.com/v0/image/380', name: 'First Pheonix' })
}));
assetsDetection.configure({
providerType: 'mainnet',
selectedAddress: '0x06012c8cf97BEaD5deAe237070F9587f8E7A266d'
Expand Down

0 comments on commit 1b70dc5

Please sign in to comment.