diff --git a/sdks/js/examples/spark-cli/src/cli.ts b/sdks/js/examples/spark-cli/src/cli.ts index 0a272e8d6..6e7b5b66e 100644 --- a/sdks/js/examples/spark-cli/src/cli.ts +++ b/sdks/js/examples/spark-cli/src/cli.ts @@ -736,7 +736,7 @@ async function runCLI() { * * 1. Get an address to deposit funds from L1 to Spark * 2. Construct a tx spending from the L1 address to the Spark address - * 3. Call initalizeDeposit with the tx hex + * 3. Call initializeDeposit with the tx hex * 4. Sign the tx * 5. Broadcast the tx */ diff --git a/sdks/js/packages/spark-sdk/tsup.config.ts b/sdks/js/packages/spark-sdk/tsup.config.ts index b74218aca..4a88cfaf1 100644 --- a/sdks/js/packages/spark-sdk/tsup.config.ts +++ b/sdks/js/packages/spark-sdk/tsup.config.ts @@ -42,7 +42,7 @@ export default defineConfig([ banner: { /* @noble/hashes assigns crypto export on module load which makes it sensitive to module load order. As a result crypto needs to be available when it first loads. - esbuild inject does not guarentee the injected module will be loaded first, + esbuild inject does not guarantee the injected module will be loaded first, so we need to leverage banner for this. An alternative to may be to wrap any imports of @noble/hashes (and other deps that import it like some @scure imports do) in local modules, and import react-native-get-random-values first in those modules. */ diff --git a/spark/common/adaptor_signature.go b/spark/common/adaptor_signature.go index 88b6cf8cd..1d90e0612 100644 --- a/spark/common/adaptor_signature.go +++ b/spark/common/adaptor_signature.go @@ -168,7 +168,7 @@ func schnorrVerifyWithAdaptor(sig *signature, hash []byte, pubKeyBytes []byte, a // 7. Fail if is_infinite(R) // 8. Fail if not hash_even_y(R) // 9. Fail is x(R) != r. - // 10. Return success iff not failure occured before reachign this + // 10. Return success iff not failure occurred before reaching this // point. // Step 1. @@ -275,6 +275,6 @@ func schnorrVerifyWithAdaptor(sig *signature, hash []byte, pubKeyBytes []byte, a // Step 10. // - // Return success iff not failure occured before reachign this + // Return success iff not failure occurred before reaching this return nil } diff --git a/spark/so/db/session.go b/spark/so/db/session.go index 5ab8663af..1bb375fcb 100644 --- a/spark/so/db/session.go +++ b/spark/so/db/session.go @@ -355,7 +355,7 @@ func (t *TxProviderWithTimeout) GetOrBeginTx(ctx context.Context) (*ent.Tx, erro // this into a goroutine so that we can run a select on: // // 1. A connection being acquired and a transaction being started successfully. - // 2. An error occuring while staring the transaction. + // 2. An error occurring while starting the transaction. // 3. Neither (1) nor (2) happening within the timeout period. // // If (3) happens, this function will return an error AND the caller needs to cancel the context in diff --git a/spark/so/ent/tokentransaction_extension.go b/spark/so/ent/tokentransaction_extension.go index dd25e94c5..649b9ea55 100644 --- a/spark/so/ent/tokentransaction_extension.go +++ b/spark/so/ent/tokentransaction_extension.go @@ -230,7 +230,7 @@ func CreateStartedTransactionEntities( Where(tokencreate.TokenIdentifier(tokenOutputs[0].TokenIdentifier)). Only(ctx) if err != nil { - // An error occured when fetching the spark token create ent. + // An error occurred when fetching the spark token create ent. return nil, fmt.Errorf("failed to fetch token create ent: %w", err) } issuerPublicKeyToWrite = tokenCreateEnt.IssuerPublicKey diff --git a/spark/so/handler/base_transfer_handler.go b/spark/so/handler/base_transfer_handler.go index 087668079..8b6f4ef35 100644 --- a/spark/so/handler/base_transfer_handler.go +++ b/spark/so/handler/base_transfer_handler.go @@ -78,11 +78,11 @@ func validateLeafRefundTxOutput(refundTx *wire.MsgTx, receiverIdentityPublicKey if err != nil { return fmt.Errorf("unable to parse receiver pubkey: %w", err) } - recieverP2trScript, err := common.P2TRScriptFromPubKey(receiverIdentityPubkey) + receiverP2trScript, err := common.P2TRScriptFromPubKey(receiverIdentityPubkey) if err != nil { return fmt.Errorf("unable to generate p2tr script from receiver pubkey: %w", err) } - if !bytes.Equal(recieverP2trScript, refundTx.TxOut[0].PkScript) { + if !bytes.Equal(receiverP2trScript, refundTx.TxOut[0].PkScript) { return fmt.Errorf("refund tx is expected to send to receiver identity pubkey") } return nil diff --git a/spark/testing/wallet/wallet.go b/spark/testing/wallet/wallet.go index ed1bce736..79d798ad3 100644 --- a/spark/testing/wallet/wallet.go +++ b/spark/testing/wallet/wallet.go @@ -451,7 +451,7 @@ func (w *SingleKeyTestWallet) RequestLeavesSwap(ctx context.Context, targetAmoun amountClaimed += int64(node.Value) } - // TODO: accomodate for fees + // TODO: accommodate for fees if amountClaimed != totalAmount { return nil, fmt.Errorf("amount claimed is not equal to the total amount") }