Skip to content

Commit

Permalink
refactor checks
Browse files Browse the repository at this point in the history
  • Loading branch information
josemarinas committed Nov 15, 2023
1 parent 613dad1 commit 20a5363
Show file tree
Hide file tree
Showing 9 changed files with 1,348 additions and 1,051 deletions.
9 changes: 2 additions & 7 deletions modules/client/src/internal/client/decoding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
decodeApplyUpdateAction,
decodeGrantAction,
decodeInitializeFromAction,
decodeUpgradeToAction,
decodeUpgradeToAndCallAction,
findInterface,
permissionParamsFromContract,
Expand Down Expand Up @@ -308,13 +309,7 @@ export class ClientDecoding extends ClientCore implements IClientDecoding {
return result[0];
}
public upgradeToAction(data: Uint8Array): string {
const daoInterface = DAO__factory.createInterface();
const hexBytes = bytesToHex(data);
const expectedFunction = daoInterface.getFunction(
"upgradeTo",
);
const result = daoInterface.decodeFunctionData(expectedFunction, hexBytes);
return result[0];
return decodeUpgradeToAction(data);
}
/**
* Decodes upgradeToAndCallback params from an upgradeToAndCallAction
Expand Down
Loading

0 comments on commit 20a5363

Please sign in to comment.