diff --git a/packages/extension/src/background/RequestBytesSign.ts b/packages/extension/src/background/RequestBytesSign.ts index eb76606aea..203dbcbd02 100644 --- a/packages/extension/src/background/RequestBytesSign.ts +++ b/packages/extension/src/background/RequestBytesSign.ts @@ -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; @@ -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) }; } }