Skip to content

Commit ac7337a

Browse files
Merge pull request #6732 from BitGo/COIN-5280-test-deposits
feat: use cosmos to register hash token
2 parents 13a6024 + f15e943 commit ac7337a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
import { BitGoBase } from '@bitgo/sdk-core';
2+
import { CosmosToken } from '@bitgo/abstract-cosmos';
23
import { Hash } from './hash';
34
import { Thash } from './thash';
45

56
export const register = (sdk: BitGoBase): void => {
67
sdk.register('hash', Hash.createInstance);
78
sdk.register('thash', Thash.createInstance);
9+
CosmosToken.createTokenConstructors().forEach(({ name, coinConstructor }) => {
10+
const baseCoin = name.split(':')[0];
11+
if (baseCoin === 'hash' || baseCoin === 'thash') {
12+
sdk.register(name, coinConstructor);
13+
}
14+
});
815
};

0 commit comments

Comments
 (0)