Skip to content

Commit

Permalink
Return hex instead of raw bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
c410-f3r committed Nov 24, 2019
1 parent 8c36056 commit 9f0857c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/extension/src/background/RequestBytesSign.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import { KeyringPair } from '@polkadot/keyring/types';
import { RequestSign } from './types';
import { SignerPayloadJSON, SignerPayloadRaw } from '@polkadot/types/types';
import { u8aToHex } from '@polkadot/util';

export default class RequestBytesSign implements RequestSign {
inner: SignerPayloadJSON | SignerPayloadRaw;
Expand All @@ -16,6 +17,6 @@ export default class RequestBytesSign implements RequestSign {
sign (pair: KeyringPair): { signature: string } {
const inner = this.inner as SignerPayloadRaw;
const signedBytes = pair.sign(new TextEncoder().encode(inner.data));
return { signature: new TextDecoder().decode(signedBytes) };
return { signature: u8aToHex(signedBytes) };
}
}

0 comments on commit 9f0857c

Please sign in to comment.