Skip to content

Commit 1d7e19a

Browse files
authored
Merge pull request #908 from dev-protocol/fix-err
Fix some errors
2 parents 4d1fe2c + d26266b commit 1d7e19a

File tree

5 files changed

+713
-423
lines changed

5 files changed

+713
-423
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@
6363
"esm": "3.2.25",
6464
"fs-extra": "11.1.1",
6565
"husky": "8.0.3",
66-
"ipfs-http-client": "60.0.1",
67-
"p-queue": "7.3.4",
68-
"p-retry": "5.1.2",
66+
"ipfs-http-client": "49.0.0",
67+
"p-queue": "6.6.2",
68+
"p-retry": "4.6.2",
6969
"prettier": "2.8.8",
7070
"rimraf": "5.0.1",
7171
"rollup": "3.26.0",

renovate.json

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11
{
22
"extends": ["config:base"],
3-
"automerge": true
3+
"automerge": true,
4+
"packageRules": [
5+
{
6+
"matchPackagePatterns": ["ipfs-http-client"],
7+
"allowedVersions": "49.0.0"
8+
},
9+
{
10+
"matchPackagePatterns": ["p-queue"],
11+
"allowedVersions": "6.6.2"
12+
},
13+
{
14+
"matchPackagePatterns": ["p-retry"],
15+
"allowedVersions": "4.6.2"
16+
}
17+
]
418
}

v0/callFunctions.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable @typescript-eslint/ban-ts-comment */
12
import { Context } from '@azure/functions'
23
import { Functions } from '@devprotocol/khaos-core'
34
import { UndefinedOr, whenDefined, whenDefinedAll } from '@devprotocol/util-ts'
@@ -48,11 +49,13 @@ export const callFunctions: CallFunctions<V0Options> = async <
4849
: never
4950
>
5051
> =>
52+
// @ts-ignore
5153
cond([
5254
[isNil, always(undefined)],
5355
[isAbi, always(f.abi)],
5456
[
5557
isAuthorize,
58+
// @ts-ignore
5659
always(
5760
((opts) =>
5861
whenDefinedAll(
@@ -68,6 +71,7 @@ export const callFunctions: CallFunctions<V0Options> = async <
6871
],
6972
[
7073
isAddresses,
74+
// @ts-ignore
7175
always(
7276
whenDefined(
7377
(options as AddressesOptions)?.options?.network,
@@ -77,6 +81,7 @@ export const callFunctions: CallFunctions<V0Options> = async <
7781
],
7882
[
7983
isOraclize,
84+
// @ts-ignore
8085
always(
8186
((opts) =>
8287
whenDefinedAll(
@@ -92,6 +97,7 @@ export const callFunctions: CallFunctions<V0Options> = async <
9297
],
9398
[
9499
isEvent,
100+
// @ts-ignore
95101
always(
96102
((opts) =>
97103
whenDefined(opts?.options?.network, (network) =>
@@ -101,6 +107,7 @@ export const callFunctions: CallFunctions<V0Options> = async <
101107
],
102108
[
103109
isPack,
110+
// @ts-ignore
104111
always(
105112
((opts) =>
106113
whenDefined(opts?.options?.results, (results) =>

v0/importFunctions.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ export const importFunctions = async (
1212
console.error('Error occurred on function importing:', err)
1313
return undefined
1414
})
15-
return fn?.abi && fn?.addresses && fn?.authorize && fn?.oraclize
15+
return fn?.abi &&
16+
(fn?.addresses as UndefinedOr<Functions['addresses']>) &&
17+
(fn?.authorize as UndefinedOr<Functions['authorize']>) &&
18+
(fn?.oraclize as UndefinedOr<Functions['oraclize']>)
1619
? fn
1720
: undefined
1821
}

0 commit comments

Comments
 (0)