Explicit help in signer error (#2610)
This commit is contained in:
@@ -288,7 +288,7 @@ export default abstract class ApiBase<ApiType extends ApiTypes> extends Init<Api
|
|||||||
if (isString(address)) {
|
if (isString(address)) {
|
||||||
const _signer = signer || this._rx.signer;
|
const _signer = signer || this._rx.signer;
|
||||||
|
|
||||||
assert(_signer?.signRaw, 'No signer exists with a signRaw interface');
|
assert(_signer?.signRaw, 'No signer exists with a signRaw interface. You possibly need to pass through an explicit keypair for the origin so it can be used for signing.');
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await _signer.signRaw({
|
await _signer.signRaw({
|
||||||
|
|||||||
@@ -250,7 +250,7 @@ export default function createClass <ApiType extends ApiTypes> ({ api, apiType,
|
|||||||
#signViaSigner = async (address: Address | string | Uint8Array, options: SignatureOptions, header: Header | null): Promise<number> => {
|
#signViaSigner = async (address: Address | string | Uint8Array, options: SignatureOptions, header: Header | null): Promise<number> => {
|
||||||
const signer = options.signer || api.signer;
|
const signer = options.signer || api.signer;
|
||||||
|
|
||||||
assert(signer, 'No signer specified, either via api.setSigner or via sign options');
|
assert(signer, 'No signer specified, either via api.setSigner or via sign options. You possibly need to pass through an explicit keypair for the origin so it can be used for signing.');
|
||||||
|
|
||||||
const payload = this.registry.createType('SignerPayload', {
|
const payload = this.registry.createType('SignerPayload', {
|
||||||
...options,
|
...options,
|
||||||
|
|||||||
Reference in New Issue
Block a user