Skip to content

Commit 2ad05a3

Browse files
committed
question
1 parent b35bdc3 commit 2ad05a3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/multichain/src/middlewares/multichainMethodCallValidator.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ const multichainMethodCallValidator = async (
5757
params: JsonRpcParams | undefined,
5858
) => {
5959
const dereffed = await dereffedPromise;
60+
6061
const methodToCheck = dereffed.methods.find(
6162
(m) => (m as unknown as ContentDescriptorObject).name === method,
6263
);
@@ -77,13 +78,13 @@ const multichainMethodCallValidator = async (
7778
},
7879
];
7980
}
80-
8181
// check each param and aggregate errors
8282
(methodToCheck as unknown as MethodObject).params.forEach((param, i) => {
8383
let paramToCheck: Json | undefined;
8484
const p = param as ContentDescriptorObject;
8585
if (isObject(params)) {
8686
paramToCheck = params[p.name];
87+
// TODO: according to the spec all of the multichain method params are objects, should this be removed?
8788
} else if (params && Array.isArray(params)) {
8889
paramToCheck = params[i];
8990
} else {

0 commit comments

Comments
 (0)