Files
common/packages/util-crypto/src/address/setSS58Format.spec.ts
T
Jaco Greeff 73708b72c7 Allow double-byte ss58 (#868)
* Allow double-byte ss58

* Update keyring tests (non-68)

* Range check

* Fixup tests and encoding

* Adjust keyring test

* Adjust

* Assert format

* Additionl subkey equivalency tests

* ecdsa tests

* Remove invalid test

* UpdateAssert of reserved

* Cleanups

* cleanups

* Last test for Substrate equality

* crosscheck update

* network null

* network
2021-02-06 17:05:54 +01:00

19 lines
409 B
TypeScript

// Copyright 2017-2021 @polkadot/util-crypto authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { encodeAddress, setSS58Format } from '.';
describe('setSS58Format', (): void => {
beforeEach((): void => {
setSS58Format(2);
});
it('sets and allows encoding using', (): void => {
expect(
encodeAddress(
new Uint8Array([1])
)
).toEqual('g4b');
});
});