From 2f213c0caef96c3da07019842fb0a6e473f797c8 Mon Sep 17 00:00:00 2001 From: George Date: Tue, 11 Jan 2022 14:03:11 -0800 Subject: [PATCH] Release v10.0.0 (#735) * Upgrade stellar-base to v7.0.0 and resolve breaking changes * Update AccountResponse to conform to Account interface --- CHANGELOG.md | 15 +++++++++++++++ package.json | 4 ++-- src/account_response.ts | 6 +----- src/utils.ts | 9 ++------- yarn.lock | 8 ++++---- 5 files changed, 24 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a58d3799c..8e4350f7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,21 @@ A breaking change will get clearly marked in this log. ## Unreleased +## [v10.0.0](https://github.com/stellar/js-stellar-sdk/compare/v9.1.0...v10.0.0) + +This release introduces breaking changes from `stellar-base`. It adds **unconditional support for muxed accounts**. Please refer to the corresponding [release notes](https://github.com/stellar/js-stellar-base/releases/tag/v7.0.0) for details on the breaking changes there. + +### Breaking Updates + +- Upgrades the stellar-base library to v7.0.0 ([#735](https://github.com/stellar/js-stellar-sdk/pull/735)). + +- Removes the `AccountResponse.createSubaccount` method since this is also gone from the underlying `Account` interface. The `stellar-base` release notes describe alternative construction methods ([#735](https://github.com/stellar/js-stellar-sdk/pull/735)). + +### Fix + +- Use the right string for liquidity pool trades ([#734](https://github.com/stellar/js-stellar-sdk/pull/734)). + + ## [v9.1.0](https://github.com/stellar/js-stellar-sdk/compare/v9.0.1...v9.1.0) ### Add diff --git a/package.json b/package.json index 12c611b85..4c80897b3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stellar-sdk", - "version": "9.1.0", + "version": "10.0.0", "description": "stellar-sdk is a library for working with the Stellar Horizon server.", "main": "./lib/index.js", "types": "./lib/index.d.ts", @@ -138,7 +138,7 @@ "eventsource": "^1.0.7", "lodash": "^4.17.21", "randombytes": "^2.1.0", - "stellar-base": "^6.0.6", + "stellar-base": "^7.0.0", "toml": "^2.3.0", "tslib": "^1.10.0", "urijs": "^1.19.1", diff --git a/src/account_response.ts b/src/account_response.ts index 8cfb06ec4..3a57f2560 100644 --- a/src/account_response.ts +++ b/src/account_response.ts @@ -1,7 +1,7 @@ /* tslint:disable:variable-name */ import forIn from "lodash/forIn"; -import { Account as BaseAccount, MuxedAccount } from "stellar-base"; +import { Account as BaseAccount } from "stellar-base"; import { Horizon } from "./horizon_api"; import { ServerApi } from "./server_api"; @@ -83,8 +83,4 @@ export class AccountResponse { this._baseAccount.incrementSequenceNumber(); this.sequence = this._baseAccount.sequenceNumber(); } - - public createSubaccount(id: string): MuxedAccount { - return this._baseAccount.createSubaccount(id); - } } diff --git a/src/utils.ts b/src/utils.ts index e0e4a0b84..c23fd1ca5 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -81,7 +81,6 @@ export namespace Utils { name: `${homeDomain} auth`, value, source: clientAccountID, - withMuxing: true, }), ) .addOperation( @@ -160,14 +159,10 @@ export namespace Utils { let transaction; try { - transaction = new Transaction(challengeTx, networkPassphrase, true); + transaction = new Transaction(challengeTx, networkPassphrase); } catch { try { - transaction = new FeeBumpTransaction( - challengeTx, - networkPassphrase, - true, - ); + transaction = new FeeBumpTransaction(challengeTx, networkPassphrase); } catch { throw new InvalidSep10ChallengeError( "Invalid challenge: unable to deserialize challengeTx transaction string", diff --git a/yarn.lock b/yarn.lock index f8c57afe1..07cbd1fed 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7876,10 +7876,10 @@ static-extend@^0.1.1: resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= -stellar-base@^6.0.6: - version "6.0.6" - resolved "https://registry.yarnpkg.com/stellar-base/-/stellar-base-6.0.6.tgz#2f95ad35ab6901a2fc0d5cb5b483436241b7123c" - integrity sha512-v0t9jeP456plMpye8W2vRq2lTvMUvRkskH5GGfqgMTeX+gBAwp7Y67wYphRt2pGQ2NXtxlsgEBSBKWvNxGp76A== +stellar-base@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/stellar-base/-/stellar-base-7.0.0.tgz#6ebb359fc0a5e8fe6ed855c62de78cbec779b463" + integrity sha512-Sfk/u/6HT+8xSQ4HvTI3XgthTS3fhv/ie6Jx4OzLvg81pt09bDDN5YvRbG6v3gZdiRA0pwg2RRz5YS3ph5ePEg== dependencies: base32.js "^0.1.0" bignumber.js "^4.0.0"