Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions sdk/localsdk/multichain/configs/chainProviders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ export const chainProviders = {
mainnet: "https://stargaze-rpc.publicnode.com:443",
testnet: "https://rpc.elgafar-1.stargaze-apis.com",
},
atom: {
mainnet: "https://cosmos-rpc.publicnode.com:443",
testnet: "https://rpc.provider-sentry-01.ics-testnet.polypore.xyz",
},
near: {
mainnet: "https://rpc.near.org",
testnet: "https://rpc.testnet.near.org",
Expand Down
6 changes: 0 additions & 6 deletions sdk/localsdk/multichain/configs/ibcProviders.ts

This file was deleted.

1 change: 1 addition & 0 deletions src/features/multichain/routines/executors/pay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export default async function handlePayOperation(
break

case "ibc":
case "atom":
result = await genericJsonRpcPay(multichain.IBC, rpcUrl, operation)
break

Expand Down
2 changes: 2 additions & 0 deletions src/libs/blockchain/gcr/gcr_routines/identityManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const chains: { [key: string]: typeof DefaultChain } = {
ton: TON,
xrpl: XRPL,
ibc: IBC,
atom: IBC,
near: NEAR,
// @ts-expect-error - BTC module contains more fields than the DefaultChain type
btc: BTC,
Expand Down Expand Up @@ -207,6 +208,7 @@ export default class IdentityManager {
chainId === "xrpl" ||
chainId === "ton" ||
chainId === "ibc" ||
chainId === "atom" ||
chainId === "near"
) {
messageVerified = await sdk.verifyMessage(
Expand Down
11 changes: 11 additions & 0 deletions src/utilities/validateUint8Array.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ export default function validateIfUint8Array(input: unknown): Uint8Array | unkno
return input
}

// Handle hex strings
if (typeof input === "string" && input.startsWith("0x")) {
const hexString = input.slice(2) // Remove "0x" prefix
// Validate hex string before conversion
if (hexString.length % 2 === 0 && /^[0-9a-fA-F]*$/.test(hexString)) {
return Buffer.from(hexString, "hex")
}

return input
}

// Type guard: check if input is a record-like object with numeric integer keys and number values
if (typeof input === "object" && input !== null) {
// Safely cast to indexable type after basic validation
Expand Down