-
Notifications
You must be signed in to change notification settings - Fork 19
feat: Support OKX extension wallet to send Bitcoin. #39
Conversation
@lukema95 is attempting to deploy a commit to the Zeta Team on Vercel. A member of the Team first needs to authorize it. |
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
Now I can successfully send the testnet BTC with the following code, but the Testnet seems to lack the const callOkxWallet = async (params: Params) => {
if (!window.okxwallet) return alert("OKX wallet not installed")
const okxwallet = window.okxwallet
// const account = (await okxwallet?.bitcoinTestnet?.getAccounts())?.[0]
// if (!account) return alert("No account found")
try {
const txHash = await okxwallet.bitcoinTestnet.send(
{
// from: account,
from: "tb1pupdwvec0gy6kh5wl953fpmj33uww0994fpcxamk6rdk6kanzl6xsq35z77",
to: params.tss,
value: params.amount / 1e8,
memo: `0x${params.contract}${params.message}`,
memoPos: 1,
}
);
return alert(`Broadcasted a transaction: ${txHash}`)
} catch (e: any) {
throw new Error(e.message || "Error sending OKX Bitcoin transaction")
}
} |
@lukema95 can you try using |
it worked, my bad😂 |
@lukema95 thanks for working on this! As the example frontend repo is getting deprecated, I've migrated the changes proposed in this PR to the UniversalKit repo: https://github.com/zeta-chain/universalkit/ |
Related: zeta-chain/docs#348