Skip to content

Commit 5aa736a

Browse files
committed
fix: treasure splitter parseFunctionParams
1 parent 6c8544c commit 5aa736a

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

src/permissionless/bindings/treasury-splitter.ts

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -99,25 +99,22 @@ export class TreasurySplitterContract extends BaseContract<typeof abi> {
9999

100100
switch (functionName) {
101101
case "distribute": {
102-
const [token] = args as [Address];
102+
const [token] = args;
103103
return {
104104
token,
105105
};
106106
}
107107

108108
case "configure": {
109-
const [callData] = args as [Hex];
109+
const [callData] = args;
110110
const decoded = decodeFunctionData({
111111
abi,
112112
data: callData,
113113
});
114-
if (decoded) {
115-
return {
116-
functionName: decoded.functionName,
117-
...super.parseFunctionParams(params),
118-
};
119-
}
120-
return super.parseFunctionParams(params);
114+
return {
115+
functionName: decoded.functionName,
116+
...super.parseFunctionParams(decoded),
117+
};
121118
}
122119

123120
default:

0 commit comments

Comments
 (0)