Skip to content

Commit

Permalink
chore: update dependencies to latest versions (#23)
Browse files Browse the repository at this point in the history
* chore: update dependencies to latest versions

* fix: fixed imports issues

* fix: fixed module
  • Loading branch information
Joy-Adah authored Oct 7, 2024
1 parent ce7defb commit b36b8a0
Show file tree
Hide file tree
Showing 11 changed files with 805 additions and 728 deletions.
33 changes: 17 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,34 +15,35 @@
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
"@rollup/plugin-inject": "^5.0.5",
"@stellar/stellar-sdk": "^12.3.0",
"@stellar/wallet-sdk": "^0.11.2",
"@sveltejs/adapter-auto": "^2.0.0",
"@sveltejs/adapter-static": "^2.0.2",
"@sveltejs/kit": "^1.20.4",
"@sveltejs/adapter-auto": "^2.1.1",
"@sveltejs/adapter-static": "^2.0.3",
"@sveltejs/kit": "^1.30.4",
"@tailwindcss/forms": "^0.5.9",
"@tailwindcss/typography": "^0.5.15",
"@types/stellar-sdk": "^0.11.1",
"autoprefixer": "^10.4.20",
"daisyui": "^3.1.11",
"eslint": "^8.28.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-svelte": "^2.44.0",
"daisyui": "^4.12.10",
"eslint": "^8.57.1",
"eslint-config-prettier": "^8.10.0",
"eslint-plugin-svelte": "^2.44.1",
"path": "^0.12.7",
"postcss": "^8.4.25",
"postcss-load-config": "^4.0.1",
"prettier": "^2.8.0",
"prettier-plugin-svelte": "^2.10.1",
"prettier-plugin-tailwindcss": "^0.6.6",
"stellar-sdk": "^10.4.1",
"postcss": "^8.4.47",
"postcss-load-config": "^4.0.2",
"prettier": "^3.3.3",
"prettier-plugin-svelte": "^3.2.7",
"prettier-plugin-tailwindcss": "^0.6.8",
"svelte": "^4.2.19",
"svelte-check": "^3.4.3",
"svelte-check": "^3.8.6",
"svelte-copy": "^1.4.2",
"svelte-feather-icons": "^4.1.0",
"svelte-local-storage-store": "^0.6.4",
"svelte-preprocess": "^5.0.4",
"svelte-preprocess": "^5.1.4",
"svelte-simple-modal": "^1.6.2",
"tailwindcss": "^3.4.13",
"typescript": "^5.6.2",
"uuid": "^9.0.0",
"uuid": "^9.0.1",
"vite": "^4.5.5"
},
"type": "module"
Expand Down
4 changes: 2 additions & 2 deletions src/lib/components/ConfirmationModal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ on the following occasions:
// We need a couple things from the stellar-sdk to reconstruct the
// Transaction object from the XDR string, when the time comes
import { Networks, TransactionBuilder } from 'stellar-sdk'
import { Networks, TransactionBuilder } from '@stellar/stellar-sdk'
// A Svelte "context" is used to control when to `open` and `close` a given
// modal from within other components
Expand Down Expand Up @@ -116,7 +116,7 @@ on the following occasions:
// opposed to an assignment) as _reactive_. In this case, every time
// `transactionXDR` or `transactionNetwork` changes, `transaction` will be
// recomputed and any dependent components would be updated accordingly.
/** @type {import('stellar-sdk').Transaction}*/
/** @type {import('@stellar/stellar-sdk').Transaction}*/
// @ts-ignore
$: transaction = transactionXDR
? TransactionBuilder.fromXDR(transactionXDR, transactionNetwork || Networks.TESTNET)
Expand Down
20 changes: 10 additions & 10 deletions src/lib/stellar/horizonQueries.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { error } from '@sveltejs/kit'
import { Server, TransactionBuilder, Networks, StrKey, Asset } from 'stellar-sdk'
import { TransactionBuilder, Networks, StrKey, Asset, Horizon } from '@stellar/stellar-sdk';

const horizonUrl = 'https://horizon-testnet.stellar.org'
const server = new Server(horizonUrl)
const horizonUrl = 'https://horizon-testnet.stellar.org';
const server = new Horizon.Server(horizonUrl)

/**
* @module $lib/stellar/horizonQueries
Expand All @@ -14,13 +14,13 @@ const server = new Server(horizonUrl)

// We'll import some type definitions that already exists within the
// `stellar-sdk` package, so our functions will know what to expect.
/** @typedef {import('stellar-sdk').ServerApi.AccountRecord} AccountRecord */
/** @typedef {import('stellar-sdk').Horizon.ErrorResponseData} ErrorResponseData */
/** @typedef {import('stellar-sdk').ServerApi.PaymentOperationRecord} PaymentOperationRecord */
/** @typedef {import('stellar-sdk').Horizon.BalanceLine} BalanceLine */
/** @typedef {import('stellar-sdk').Horizon.BalanceLineAsset} BalanceLineAsset */
/** @typedef {import('stellar-sdk').Transaction} Transaction */
/** @typedef {import('stellar-sdk').ServerApi.PaymentPathRecord} PaymentPathRecord */
/** @typedef {import('@stellar/stellar-sdk').ServerApi.AccountRecord} AccountRecord */
/** @typedef {import('@stellar/stellar-sdk').Horizon.ErrorResponseData} ErrorResponseData */
/** @typedef {import('@stellar/stellar-sdk').ServerApi.PaymentOperationRecord} PaymentOperationRecord */
/** @typedef {import('@stellar/stellar-sdk').Horizon.BalanceLine} BalanceLine */
/** @typedef {import('@stellar/stellar-sdk').Horizon.BalanceLineAsset} BalanceLineAsset */
/** @typedef {import('@stellar/stellar-sdk').Transaction} Transaction */
/** @typedef {import('@stellar/stellar-sdk').ServerApi.PaymentPathRecord} PaymentPathRecord */

/**
* Fetches and returns details about an account on the Stellar network.
Expand Down
4 changes: 2 additions & 2 deletions src/lib/stellar/sep1.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { StellarTomlResolver } from 'stellar-sdk'
import { StellarToml } from '@stellar/stellar-sdk'

/**
* @module $lib/stellar/sep1
Expand All @@ -19,7 +19,7 @@ import { StellarTomlResolver } from 'stellar-sdk'
* @returns {Promise<StellarToml>} A `Promise` that resolves to the parsed `stellar.toml` object
*/
export async function fetchStellarToml(domain) {
let stellarToml = await StellarTomlResolver.resolve(domain)
let stellarToml = await StellarToml.Resolver.resolve(domain)
return stellarToml
}

Expand Down
4 changes: 2 additions & 2 deletions src/lib/stellar/sep10.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Utils } from 'stellar-sdk'
import { WebAuth } from '@stellar/stellar-sdk'
import { error } from '@sveltejs/kit'
import { fetchStellarToml, getWebAuthEndpoint } from '$lib/stellar/sep1'

Expand Down Expand Up @@ -79,7 +79,7 @@ function validateChallengeTransaction({
try {
// Use the `readChallengeTx` function from Stellar SDK to read and
// verify most of the challenge transaction information
let results = Utils.readChallengeTx(
let results = WebAuth.readChallengeTx(
transactionXDR,
serverSigningKey,
network,
Expand Down
12 changes: 6 additions & 6 deletions src/lib/stellar/transactions.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TransactionBuilder, Networks, Server, Operation, Asset, Memo } from 'stellar-sdk'
import { TransactionBuilder, Networks, Operation, Asset, Memo, Horizon } from '@stellar/stellar-sdk'
import { error } from '@sveltejs/kit'

/**
Expand Down Expand Up @@ -53,7 +53,7 @@ export async function createCreateAccountTransaction({ source, destination, amou
// First, we setup our transaction by loading the source account from the
// network, and initializing the TransactionBuilder. This is the first step
// in constructing all Stellar transactions.
let server = new Server(horizonUrl)
let server = new Horizon.Server(horizonUrl)
let sourceAccount = await server.loadAccount(source)
let transaction = new TransactionBuilder(sourceAccount, {
networkPassphrase: networkPassphrase,
Expand Down Expand Up @@ -98,7 +98,7 @@ export async function createPaymentTransaction({ source, destination, asset, amo
// First, we setup our transaction by loading the source account from the
// network, and initializing the TransactionBuilder. This is the first step
// in constructing all Stellar transactions.
let server = new Server(horizonUrl)
let server = new Horizon.Server(horizonUrl)
let sourceAccount = await server.loadAccount(source)
let transaction = new TransactionBuilder(sourceAccount, {
networkPassphrase: networkPassphrase,
Expand Down Expand Up @@ -157,7 +157,7 @@ export async function createChangeTrustTransaction({ source, asset, limit }) {

// Next, we setup our transaction by loading the source account from the
// network, and initializing the TransactionBuilder.
let server = new Server(horizonUrl)
let server = new Horizon.Server(horizonUrl)
let sourceAccount = await server.loadAccount(source)

// Chaning everything together from the `transaction` declaration means we
Expand Down Expand Up @@ -212,7 +212,7 @@ export async function createPathPaymentStrictSendTransaction({
// First, we setup our transaction by loading the source account from the
// network, and initializing the TransactionBuilder. This is the first step
// in constructing all Stellar transactions.
let server = new Server(horizonUrl)
let server = new Horizon.Server(horizonUrl)
let sourceAccount = await server.loadAccount(source)
let transaction = new TransactionBuilder(sourceAccount, {
networkPassphrase: networkPassphrase,
Expand Down Expand Up @@ -285,7 +285,7 @@ export async function createPathPaymentStrictReceiveTransaction({
// First, we setup our transaction by loading the source account from the
// network, and initializing the TransactionBuilder. This is the first step
// in constructing all Stellar transactions.
let server = new Server(horizonUrl)
let server = new Horizon.Server(horizonUrl)
let sourceAccount = await server.loadAccount(source)
let transaction = new TransactionBuilder(sourceAccount, {
networkPassphrase: networkPassphrase,
Expand Down
2 changes: 1 addition & 1 deletion src/lib/stores/contactsStore.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { v4 as uuidv4 } from 'uuid'
import { persisted } from 'svelte-local-storage-store'
import { StrKey } from 'stellar-sdk'
import { StrKey } from '@stellar/stellar-sdk'
import { error } from '@sveltejs/kit'
import { get } from 'svelte/store'

Expand Down
4 changes: 2 additions & 2 deletions src/lib/stores/walletStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { error } from '@sveltejs/kit'
import { get } from 'svelte/store'
import { persisted } from 'svelte-local-storage-store'
import { KeyManager, KeyManagerPlugins, KeyType } from '@stellar/wallet-sdk'
import { TransactionBuilder } from 'stellar-sdk'
import { TransactionBuilder } from '@stellar/stellar-sdk'

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

/**
* @typedef {Object} WalletStore
Expand Down
2 changes: 1 addition & 1 deletion src/lib/utils/devHelpers.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { get } from 'svelte/store'
import { contacts } from '$lib/stores/contactsStore'
import { Asset, Keypair, Operation } from 'stellar-sdk'
import { Asset, Keypair, Operation } from '@stellar/stellar-sdk'
import { fundWithFriendbot, startTransaction, submit } from '$lib/stellar/horizonQueries'
import { fetchAssets } from '$lib/utils/stellarExpert'

Expand Down
2 changes: 1 addition & 1 deletion src/routes/signup/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ circumstance.
*/
// We import things from external packages that will be needed
import { Keypair } from 'stellar-sdk'
import { Keypair } from '@stellar/stellar-sdk'
// We import any Svelte components we will need
import TruncatedKey from '$lib/components/TruncatedKey.svelte'
Expand Down
Loading

0 comments on commit b36b8a0

Please sign in to comment.