Xlab/fix/extra space (#2494)
* Fix extra space in `provider.send` signature from fabio. Fixes #2285. * Fix style and update changelog. Co-authored-by: Maxim <max@kc.vc>
This commit is contained in:
@@ -1,4 +1,13 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"version": "5.4.1",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Fix extra space in `provider.send` signature",
|
||||||
|
"pr": 2428
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"version": "5.4.0",
|
"version": "5.4.0",
|
||||||
"changes": [
|
"changes": [
|
||||||
|
@@ -74,7 +74,7 @@ export const providerUtils = {
|
|||||||
} else if ((supportedProvider as any).send !== undefined) {
|
} else if ((supportedProvider as any).send !== undefined) {
|
||||||
// HACK(fabio): Detect if the `send` method has the old interface `send(payload, cb)` such
|
// HACK(fabio): Detect if the `send` method has the old interface `send(payload, cb)` such
|
||||||
// as in versions < Web3.js@1.0.0-beta.37. If so, do a simple re-mapping
|
// as in versions < Web3.js@1.0.0-beta.37. If so, do a simple re-mapping
|
||||||
if (_.includes((supportedProvider as any).send.toString(), 'function (payload, callback)')) {
|
if (_.includes((supportedProvider as any).send.toString().replace(' ', ''), 'function(payload,callback)')) {
|
||||||
provider.sendAsync = (supportedProvider as any).send.bind(supportedProvider);
|
provider.sendAsync = (supportedProvider as any).send.bind(supportedProvider);
|
||||||
return provider;
|
return provider;
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user