diff --git a/src/address/index.ts b/src/address/index.ts index 4c682ad..623d7cf 100644 --- a/src/address/index.ts +++ b/src/address/index.ts @@ -7,7 +7,7 @@ export const getAddress = async (options: GetAddressOptions) => { const { getProvider = getDefaultProvider } = options; const provider = await getProvider(); if (!provider) { - throw new Error('No Bitcoin Wallet installed'); + throw new Error('No Bitcoin wallet installed'); } const { purposes } = options.payload; diff --git a/src/call/index.ts b/src/call/index.ts index a22ca4a..7401e62 100644 --- a/src/call/index.ts +++ b/src/call/index.ts @@ -24,7 +24,7 @@ export const callWalletPopup = async (options: CallWalletOptions) => { const { getProvider = getDefaultProvider } = options; const provider = await getProvider(); if (!provider) { - throw new Error('No Bitcoin Wallet installed'); + throw new Error('No Bitcoin wallet installed'); } const { method } = options.payload; diff --git a/src/signatures/index.ts b/src/signatures/index.ts index 579c0d3..0ad3559 100644 --- a/src/signatures/index.ts +++ b/src/signatures/index.ts @@ -7,15 +7,15 @@ export const signMessage = async (options: SignMessageOptions) => { const { getProvider = getDefaultProvider } = options; const provider = await getProvider(); if (!provider) { - throw new Error('No Bitcoin Wallet installed'); + throw new Error('No Bitcoin wallet installed'); } const { address, message } = options.payload; if (!address) { - throw new Error('An Address is required to sign a message'); + throw new Error('An address is required to sign a message'); } if (!message) { - throw new Error('you need to provide a message to be signed'); + throw new Error('A message to be signed is required'); } try { @@ -23,7 +23,7 @@ export const signMessage = async (options: SignMessageOptions) => { const response = await provider.signMessage(request); options.onFinish?.(response); } catch (error) { - console.error('[Connect] Error during Signing request', error); + console.error('[Connect] Error during sign message request', error); options.onCancel?.(); } }; diff --git a/src/transactions/sendBtcTransaction.ts b/src/transactions/sendBtcTransaction.ts index e88f79e..ba5f09d 100644 --- a/src/transactions/sendBtcTransaction.ts +++ b/src/transactions/sendBtcTransaction.ts @@ -20,15 +20,15 @@ export const sendBtcTransaction = async (options: SendBtcTransactionOptions) => const { getProvider = getDefaultProvider } = options; const provider = await getProvider(); if (!provider) { - throw new Error('No Bitcoin Wallet installed'); + throw new Error('No Bitcoin wallet installed'); } const { amountSats, recipientAddress } = options.payload; if (!amountSats) { - throw new Error('a value for amount to be transferred is required'); + throw new Error('An amount to be transferred is required'); } if (!recipientAddress) { - throw new Error('the recipient address is required'); + throw new Error('A recipient address is required'); } try { @@ -36,7 +36,7 @@ export const sendBtcTransaction = async (options: SendBtcTransactionOptions) => const addressResponse = await provider.sendBtcTransaction(request); options.onFinish?.(addressResponse); } catch (error) { - console.error('[Connect] Error during send btc request', error); + console.error('[Connect] Error during send transaction request', error); options.onCancel?.(); } }; diff --git a/src/transactions/signTransaction.ts b/src/transactions/signTransaction.ts index d7e0766..8cb303c 100644 --- a/src/transactions/signTransaction.ts +++ b/src/transactions/signTransaction.ts @@ -32,15 +32,15 @@ export const signTransaction = async (options: SignTransactionOptions) => { const { getProvider = getDefaultProvider } = options; const provider = await getProvider(); if (!provider) { - throw new Error('No Bitcoin Wallet installed'); + throw new Error('No Bitcoin wallet installed'); } const { psbtBase64, inputsToSign } = options.payload; if (!psbtBase64) { - throw new Error('a value for psbtBase64 representing the tx hash is required'); + throw new Error('A value for psbtBase64 representing the tx hash is required'); } if (!inputsToSign) { - throw new Error('an array specifying the inputs to be signed by the wallet is required'); + throw new Error('An array specifying the inputs to be signed by the wallet is required'); } try { @@ -48,7 +48,7 @@ export const signTransaction = async (options: SignTransactionOptions) => { const addressResponse = await provider.signTransaction(request); options.onFinish?.(addressResponse); } catch (error) { - console.error('[Connect] Error during signPsbt request', error); + console.error('[Connect] Error during sign transaction request', error); options.onCancel?.(); } };