diff --git a/packages/sdk/src/browser-wallets/coin98/addresses.ts b/packages/sdk/src/browser-wallets/coin98/addresses.ts index cb0b2e0d..97076423 100644 --- a/packages/sdk/src/browser-wallets/coin98/addresses.ts +++ b/packages/sdk/src/browser-wallets/coin98/addresses.ts @@ -12,18 +12,18 @@ export async function getAddresses(network: Network) { } let targetNetwork: UnisatNetwork = "livenet" - const connectedNetwork = await window.coin98.getNetwork() + const connectedNetwork = await window.coin98.bitcoin.getNetwork() if (network === "testnet") { targetNetwork = network } if (connectedNetwork !== targetNetwork) { - await window.coin98.switchNetwork(targetNetwork) + await window.coin98.bitcoin.switchNetwork(targetNetwork) } - const accounts = await window.coin98.requestAccounts() - const publicKey = await window.coin98.getPublicKey() + const accounts = await window.coin98.bitcoin.requestAccounts() + const publicKey = await window.coin98.bitcoin.getPublicKey() if (!accounts[0]) { return [] diff --git a/packages/sdk/src/browser-wallets/coin98/signatures.ts b/packages/sdk/src/browser-wallets/coin98/signatures.ts index 1efb9df3..39d2dac8 100644 --- a/packages/sdk/src/browser-wallets/coin98/signatures.ts +++ b/packages/sdk/src/browser-wallets/coin98/signatures.ts @@ -13,7 +13,7 @@ export async function signPsbt( } const psbtHex = psbt.toHex() - const signedPsbtHex = await window.coin98.signPsbt(psbtHex, { autoFinalized: finalize }) + const signedPsbtHex = await window.coin98.bitcoin.signPsbt(psbtHex, { autoFinalized: finalize }) if (!signedPsbtHex) { throw new Error("Failed to sign psbt hex using Coin98") } @@ -35,7 +35,7 @@ export async function signMessage(message: string) { throw new Error("Coin98 not installed.") } - const signature = await window.coin98.signMessage(message) + const signature = await window.coin98.bitcoin.signMessage(message) if (!signature) { throw new Error("Failed to sign message using Coin98")