Skip to content

Commit 3bd3969

Browse files
authored
fix(sdk): to hex (#3769)
2 parents 0aec33d + cb91bc6 commit 3bd3969

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

typescript-sdk/bun.lockb

151 KB
Binary file not shown.

typescript-sdk/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@unionlabs/client",
3-
"version": "0.0.60",
3+
"version": "0.0.61",
44
"homepage": "https://union.build",
55
"description": "Union Labs cross-chain transfers client",
66
"type": "module",

typescript-sdk/src/evm/client.ts

+3-5
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ import {
88
type CustomTransport,
99
type FallbackTransport,
1010
createPublicClient,
11-
http
11+
http,
12+
toHex
1213
} from "viem"
1314
import {
1415
// evmSameChainTransfer,
@@ -33,7 +34,6 @@ import type {
3334
TransferAssetParameters
3435
} from "../types.ts"
3536
import { ucs03ZkgmAbi } from "../abi/ucs-03.ts"
36-
import { bech32AddressToHex } from "../convert.ts"
3737
import { generateSalt, timestamp } from "../utilities/index.ts"
3838
export { sepolia, scrollSepolia, arbitrumSepolia, berachainTestnetbArtio }
3939

@@ -107,9 +107,7 @@ export const createEvmClient = (parameters: EvmClientParameters) => {
107107
*/
108108
args: [
109109
sourceChannelId,
110-
receiver.startsWith("0x")
111-
? getAddress(receiver)
112-
: bech32AddressToHex({ address: receiver }),
110+
receiver.startsWith("0x") ? getAddress(receiver) : toHex(receiver),
113111
baseToken,
114112
baseAmount,
115113
quoteToken,

0 commit comments

Comments
 (0)