Skip to content

feat(sdk-coin-xrp): add default no ripple flag to trustset #6123

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
3 changes: 3 additions & 0 deletions modules/sdk-coin-xrp/src/lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ export const VALID_ACCOUNT_SET_FLAGS = [
export const USER_KEY_SETTING_FLAG = 65536;
export const MASTER_KEY_DEACTIVATION_FLAG = 1048576;
export const REQUIRE_DESTINATION_TAG_FLAG = 131072;

// TrustSet flags
export const NO_RIPPLE_FLAG = 131072;
2 changes: 2 additions & 0 deletions modules/sdk-coin-xrp/src/lib/trustsetBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { BuildTransactionError, TransactionType } from '@bitgo/sdk-core';
import { BaseCoin as CoinConfig } from '@bitgo/statics';
import BigNumber from 'bignumber.js';
import { IssuedCurrencyAmount, TrustSet } from 'xrpl';
import { NO_RIPPLE_FLAG } from './constants';
import { XrpTransactionType } from './iface';
import { Transaction } from './transaction';
import { TransactionBuilder } from './transactionBuilder';
Expand Down Expand Up @@ -70,6 +71,7 @@ export class TrustSetBuilder extends TransactionBuilder {
TransactionType: this.xrpTransactionType,
Account: this._sender,
LimitAmount: this._amount,
Flags: NO_RIPPLE_FLAG,
};

this._specificFields = trustSetFields;
Expand Down
Loading