Remove handled address tranform logs (#3807)
* Remove handled address tranform logs * Update packages/react-params/src/initValue.ts * Update packages/react-params/src/initValue.ts
This commit is contained in:
parent
7cfadd4e0f
commit
7b299cc4bd
@ -88,14 +88,11 @@ function Call (props: Props): React.ReactElement<Props> | null {
|
||||
(): void => {
|
||||
if (!accountId || !callContract || !callMessage || !endowment || !weight) return;
|
||||
|
||||
!!callContract && callContract
|
||||
callContract
|
||||
.call('rpc', callMessage.def.name, endowment, weight, ...params)
|
||||
.send(accountId)
|
||||
.then(
|
||||
(outcome: ContractCallOutcome): void => {
|
||||
setOutcomes([outcome, ...outcomes]);
|
||||
}
|
||||
);
|
||||
.then((outcome: ContractCallOutcome) => setOutcomes([outcome, ...outcomes]))
|
||||
.catch(console.error);
|
||||
},
|
||||
[accountId, callContract, callMessage, endowment, weight, outcomes, params]
|
||||
);
|
||||
@ -111,7 +108,7 @@ function Call (props: Props): React.ReactElement<Props> | null {
|
||||
);
|
||||
|
||||
const isValid = useMemo(
|
||||
(): boolean => !!accountId && !!callContract && !!callContract.address && !!callContract.abi && isWeightValid && isEndowmentValid,
|
||||
() => !!accountId && !!callContract && !!callContract.address && !!callContract.abi && isWeightValid && isEndowmentValid,
|
||||
[accountId, callContract, isEndowmentValid, isWeightValid]
|
||||
);
|
||||
|
||||
|
||||
@ -60,7 +60,7 @@ function transformToAddress (value?: string | Uint8Array | null): string | null
|
||||
try {
|
||||
return addressToAddress(value) || null;
|
||||
} catch (error) {
|
||||
console.error('Unable to transform address', value);
|
||||
// noop, handled by return
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@ -15,7 +15,7 @@ export default function toAddress (value?: string | Uint8Array | null, allowIndi
|
||||
|
||||
return keyring.encodeAddress(u8a);
|
||||
} catch (error) {
|
||||
console.error('Unable to encode address', (error as Error).message, value);
|
||||
// noop, undefined return indicates invalid/transient
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user