Update keyring, new ss58 checksums (#812)

This commit is contained in:
Jaco Greeff
2019-03-29 15:16:11 +01:00
committed by GitHub
parent bd4493c771
commit e2b15adaf2
43 changed files with 120 additions and 114 deletions
+3 -3
View File
@@ -30,9 +30,9 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/type-storage#readme",
"dependencies": {
"@babel/runtime": "^7.4.0",
"@polkadot/keyring": "^0.42.1",
"@polkadot/keyring": "^0.43.0-beta.0",
"@polkadot/types": "^0.53.0-beta.1",
"@polkadot/util": "^0.42.1",
"@polkadot/util-crypto": "^0.42.1"
"@polkadot/util": "^0.43.0-beta.0",
"@polkadot/util-crypto": "^0.43.0-beta.0"
}
}
@@ -2,6 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { u8aToHex } from '@polkadot/util';
import { Metadata } from '@polkadot/types';
import json from '@polkadot/types/Metadata/v0/static';
@@ -20,11 +21,13 @@ describe('fromMetadata', () => {
expect(() => newStorage.timestamp.now()).not.toThrow();
});
// FIXME check again when we have a valid chain/UI
it('should return the correct length-prefixed storage key', () => {
expect(newStorage.balances.freeBalance('5GwPuAgYgP6q58uWTXp4uSg6FwfzQv9HfFZwAFEREUrQjCvy')).toEqual(
// U8a is length-prefixed
Uint8Array.from([64, 52, 103, 23, 10, 157, 95, 244, 9, 70, 215, 120, 149, 1, 238, 109, 69])
expect(
u8aToHex(
newStorage.balances.freeBalance('5DkQbYAExs3M2sZgT1Ec3mKfZnAQCL4Dt9beTCknkCUn5jzo')
)
).toEqual(
'0x404af2c53fce3ec33c6ccccf22e926f1a7'
);
});
});