Skip to content

Commit 0a6c0a2

Browse files
committed
fix(safe): convert chain id to number
The type signature that's generated in types/supabaseData.ts claims that chain_id is a number, while in reality it's a string.
1 parent 3366401 commit 0a6c0a2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/commands/CommandFactory.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ export function getCommand(request: SignatureRequest): ISafeApiCommand {
1313
return new UserUpsertCommand(
1414
request.safe_address,
1515
request.message_hash,
16-
request.chain_id,
16+
// The type is lying. It's a string.
17+
Number(request.chain_id),
1718
);
1819
default:
1920
console.warn("Unrecognized purpose:", request.purpose);

0 commit comments

Comments
 (0)