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:
parent
8417fe4fdb
commit
eb50f3fa9c
@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"version": "5.4.1",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Fix extra space in `provider.send` signature",
|
||||
"pr": 2428
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "5.4.0",
|
||||
"changes": [
|
||||
|
@ -74,7 +74,7 @@ export const providerUtils = {
|
||||
} else if ((supportedProvider as any).send !== undefined) {
|
||||
// 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
|
||||
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);
|
||||
return provider;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user