Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow max_fee and fee_charged to be a string in TransactionResponse. #528

Merged
merged 1 commit into from
Apr 24, 2020

Conversation

abuiles
Copy link
Contributor

@abuiles abuiles commented Apr 24, 2020

The attributes max_fee and fee_charged in TransactionResponse can be now a number or a string. Horizon will start sending string in version 1.3.0.

@abuiles abuiles requested a review from tamirms April 24, 2020 19:15
@abuiles abuiles force-pushed the change-max-fee-and-fee-charged branch from bb2d999 to a57f9c9 Compare April 24, 2020 19:15
@@ -30,8 +30,8 @@ export namespace Horizon {
> {
created_at: string;
fee_meta_xdr: string;
fee_charged: number;
max_fee: number;
fee_charged: number | string;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it make sense to represent it as a BigNumber?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tamirms so at the SDK level it comes as a string, consumers can then use BigNumber or any other library to parse it.

@abuiles abuiles merged commit 636b985 into release-v5.0.0 Apr 24, 2020
@abuiles abuiles deleted the change-max-fee-and-fee-charged branch April 24, 2020 21:45
@abuiles abuiles mentioned this pull request Apr 27, 2020
abuiles added a commit that referenced this pull request Apr 27, 2020
### Add
- Add fee bump related attributes to `TransactionResponse` ([#532](#532)): 
    - `fee_account: string`.
    - `fee_bump_transaction: FeeBumpTransactionResponse`:
      ```js
      interface FeeBumpTransactionResponse {
        hash: string;
        signatures: string[];
      }
      ```
    - `inner_transaction: InnerTransactionResponse`: 
      ```js
      interface InnerTransactionResponse {
        hash: string;
        signatures: string[];
        max_fee: string;
      }
      ```
- Add `memo_bytes: string` to `TransactionResponse` ([#532](#532)).
- Add `authorize_to_maintain_liabilities: boolean` to `AllowTrustOperation` ([#532](#532)).
- Add `is_authorized_to_maintain_liabilities: boolean` to `BalanceLineNative` ([#532](#532)).
- Add new result codes to `TransactionFailedResultCodes` ([#531](#531)).
  ```js
  TX_FEE_BUMP_INNER_SUCCESS = "tx_fee_bump_inner_success",
  TX_FEE_BUMP_INNER_FAILED = "tx_fee_bump_inner_failed",
  TX_NOT_SUPPORTED = "tx_not_supported",
  TX_SUCCESS = "tx_success",
  TX_TOO_EARLY = "tx_too_early",
  TX_TOO_LATE = "tx_too_late",
  TX_MISSING_OPERATION = "tx_missing_operation",
  TX_INSUFFICIENT_BALANCE = "tx_insufficient_balance",
  TX_NO_SOURCE_ACCOUNT = "tx_no_source_account",
  TX_INSUFFICIENT_FEE = "tx_insufficient_fee",
  TX_INTERNAL_ERROR = "tx_internal_error",
  ```

### Breaking changes 
- The attributes `max_fee` and `fee_charged` in `TransactionResponse` can be now a `number` or a `string`. 
  Update your code to handle both types since Horizon will start sending `string` in version `1.3.0` ([#528](#528)).
- Bump `stellar-base` to `v3.0.0`: This new version of stellar-base brings support for protocol 13, including multiple breaking changes which might affect your code, please review the list of breaking changes in [stellar-base@3.0.0](https://github.com/stellar/js-stellar-base/releases/tag/v3.0.0) release ([#524](#524)).
- Make `networkPassphrase` a required argument in `Utils.buildChallengeTx` and  `Utils.readChallengeTx` ([#524](#524)).
- Remove `Server.paths` ([#525](#525)).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants