|
1 | | -import Registry, { Blank, MVMTestnet } from '../../src/mvm/registry'; |
| 1 | +import Registry from '../../src/mvm/registry'; |
| 2 | +import { BlankAddress, MVMTestnet } from '../../src'; |
2 | 3 |
|
3 | 4 | describe('Tests for registry', () => { |
4 | 5 | const registry = new Registry({ address: MVMTestnet.Registry.Address, uri: MVMTestnet.RPCUri}); |
5 | 6 |
|
6 | 7 | test('Test for fetch mvm address of mixin asset', async () => { |
7 | | - const address = await registry.fetchAssetAddress('965e5c6e-434c-3fa9-b780-c50f43cd955c'); |
8 | | - expect(address).toMatch('0x155bDfAb24f07630C27a3F31634B33F94eC4A634'); |
| 8 | + const address = await registry.fetchAssetContract('965e5c6e-434c-3fa9-b780-c50f43cd955c'); |
| 9 | + expect(address).toMatch('0x9896c802e143A59A98c0C26bBa6d11C1AAF4A023'); |
9 | 10 | }); |
10 | 11 |
|
11 | 12 | test('Test for fetch invalid mvm address of mixin asset', async () => { |
12 | | - const address = await registry.fetchAssetAddress('e9e5b807-fa8b-455a-8dfa-b189d28310ff'); |
13 | | - expect(address).toMatch(Blank); |
| 13 | + const address = await registry.fetchAssetContract('e9e5b807-fa8b-455a-8dfa-b189d28310ff'); |
| 14 | + expect(address).toMatch(BlankAddress); |
14 | 15 | }); |
15 | 16 |
|
16 | | - test('Test for fetch mvm address of mixin user', async () => { |
17 | | - const address = await registry.fetchUsersAddress(['e9e5b807-fa8b-455a-8dfa-b189d28310ff'], 1); |
18 | | - expect(address).toMatch('0x8a9f2B6492A3E24B1D2b92ad29E80549Be6B21Cc'); |
19 | | - }); |
20 | | - |
21 | | - test('Test for fetch mvm address of a mixin user without threshold', async () => { |
22 | | - const address = await registry.fetchUserAddress('e9e5b807-fa8b-455a-8dfa-b189d28310ff'); |
23 | | - expect(address).toMatch('0x8a9f2B6492A3E24B1D2b92ad29E80549Be6B21Cc'); |
| 17 | + test('Test for fetch invalid mvm address of mixin user', async () => { |
| 18 | + const address = await registry.fetchUsersContract(['965e5c6e-434c-3fa9-b780-c50f43cd955c'], 1); |
| 19 | + expect(address).toMatch(BlankAddress); |
24 | 20 | }); |
25 | 21 |
|
26 | | - test('Test for fetch invalid mvm address of mixin user', async () => { |
27 | | - const address = await registry.fetchUsersAddress(['965e5c6e-434c-3fa9-b780-c50f43cd955c'], 1); |
28 | | - expect(address).toMatch(Blank); |
| 22 | + test('Test for fetch mvm address of mixin user', async () => { |
| 23 | + const address = await registry.fetchUsersContract(['e9e5b807-fa8b-455a-8dfa-b189d28310ff'], 1); |
| 24 | + expect(address).toMatch('0xc09516323c601006DbaDb330778fADCE08593252'); |
29 | 25 | }); |
30 | 26 |
|
31 | | - test('Test for default registry', async () => { |
32 | | - const defaultRegistry = new Registry({}); |
33 | | - const address = await defaultRegistry.fetchAssetAddress('965e5c6e-434c-3fa9-b780-c50f43cd955c'); |
34 | | - expect(address).toMatch('0x155bDfAb24f07630C27a3F31634B33F94eC4A634'); |
| 27 | + test('Test for fetch mvm address of a mixin user without threshold', async () => { |
| 28 | + const address = await registry.fetchUserContract('e9e5b807-fa8b-455a-8dfa-b189d28310ff'); |
| 29 | + expect(address).toMatch('0xc09516323c601006DbaDb330778fADCE08593252'); |
35 | 30 | }); |
36 | 31 | }); |
0 commit comments