Skip to content

Commit 2a4e29a

Browse files
committed
remove unused imports
1 parent b099b05 commit 2a4e29a

File tree

3 files changed

+11
-13
lines changed

3 files changed

+11
-13
lines changed

src/lib/stellar/horizonQueries.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// @ts-nocheck
22
import { error } from '@sveltejs/kit'
3-
import { Server, TransactionBuilder, Networks, StrKey, Asset, Horizon } from '@stellar/stellar-sdk'
3+
import { TransactionBuilder, Networks, StrKey, Asset, Horizon } from '@stellar/stellar-sdk'
44

55
const horizonUrl = 'https://horizon-testnet.stellar.org';
66
export const server = new Horizon.Server(horizonUrl);
@@ -228,4 +228,4 @@ export async function findStrictReceivePaths({
228228
} else {
229229
throw error(400, { message: 'no strict receive paths available' })
230230
}
231-
}
231+
}

src/lib/stellar/transactions.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import Server from '@stellar/stellar-sdk'
2-
import { TransactionBuilder, Networks, Operation, Asset, Memo, Contract, Horizon, xdr, Address, StrKey, rpc, nativeToScVal } from '@stellar/stellar-sdk'
1+
import { TransactionBuilder, Networks, Operation, Asset, Memo, Contract, Horizon, rpc, nativeToScVal } from '@stellar/stellar-sdk'
32
import { error } from '@sveltejs/kit'
43
/**
54
* @module $lib/stellar/transactions

src/lib/stores/walletStore.js

+8-9
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ import { KeyManager, LocalStorageKeyStore, ScryptEncrypter, KeyType } from '@ste
55
import { TransactionBuilder } from '@stellar/stellar-sdk'
66
import {
77
StellarWalletsKit,
8-
WalletNetwork,
98
allowAllModules,
109
XBULL_ID
1110
} from '@creit.tech/stellar-wallets-kit';
12-
11+
1312

1413
/** @typedef {import('@stellar/stellar-sdk').Transaction} Transaction */
1514

@@ -83,7 +82,7 @@ function createWalletStore() {
8382
console.error('Error saving key', err)
8483
// @ts-ignore
8584
throw error(400, { message: err.toString() })
86-
}
85+
}
8786
},
8887

8988
/**
@@ -121,25 +120,25 @@ function createWalletStore() {
121120
*/
122121
sign: async ({ transactionXDR, network, pincode }) => {
123122
try {
124-
123+
125124
const { keyId, publicKey } = get(walletStore);
126-
125+
127126
if (keyId === publicKey) {
128-
127+
129128
const kit = new StellarWalletsKit({
130129
// @ts-ignore
131130
network: network,
132131
selectedWalletId: XBULL_ID,
133132
modules: allowAllModules(),
134133
});
135134
const { address } = await kit.getAddress();
136-
135+
137136
// Sign the transaction using the wallet address
138137
const { signedTxXdr } = await kit.signTransaction(transactionXDR, {
139138
address,
140139
networkPassphrase: network, // or use your specific network passphrase
141140
});
142-
141+
143142
// @ts-ignore
144143
return signedTxXdr; // Return the signed transaction
145144
} else {
@@ -182,4 +181,4 @@ const setupKeyManager = () => {
182181
keyManager.registerEncrypter(ScryptEncrypter)
183182

184183
return keyManager
185-
}
184+
}

0 commit comments

Comments
 (0)