Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdks/js/examples/spark-cli/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
2 changes: 1 addition & 1 deletion sdks/js/packages/spark-sdk/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
4 changes: 2 additions & 2 deletions spark/common/adaptor_signature.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
}
2 changes: 1 addition & 1 deletion spark/so/db/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion spark/so/ent/tokentransaction_extension.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions spark/so/handler/base_transfer_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion spark/testing/wallet/wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down