mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-02-04 23:33:24 +00:00
Parse bytes types to a hex buffer (#1731)
* Parse bytes types to a hex buffer * Revert yarn lock changes
This commit is contained in:
parent
6c84654172
commit
fee8d63088
@ -95,8 +95,12 @@ export default class AbiFunction {
|
||||
return mapppedType ? mapppedType(value) : BN.isBN(value) ? value.toString() : value;
|
||||
};
|
||||
|
||||
private parsePreEncodedValue = (_: string, value: any) =>
|
||||
BN.isBN(value) ? value.toString() : value;
|
||||
private parsePreEncodedValue = (type: string, value: any) => {
|
||||
if (type === 'bytes') {
|
||||
return Buffer.from(value, 'hex');
|
||||
}
|
||||
return BN.isBN(value) ? value.toString() : value;
|
||||
};
|
||||
|
||||
private makeFuncParams = () =>
|
||||
this.inputs.reduce((accumulator, currInput) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user