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

Rename MPTokenHolder to Holder #1062

Open
wants to merge 1 commit into
base: staging
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { formatAmount } from '../../../../../rippled/lib/txSummary/formatAmount'
export const Description = ({ data }: TransactionDescriptionProps) => {
const issuer = data.tx.Account
const amount = formatAmount(data.tx.Amount)
const holder = amount.isMPT ? data.tx.MPTokenHolder : data.tx.Amount.issuer
const holder = amount.isMPT ? data.tx.Holder : data.tx.Amount.issuer
amount.issuer = issuer
return (
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const parser: TransactionParser<Clawback, ClawbackInstructions> = (
const amount = formatAmount(tx.Amount)

if (amount.isMPT === true) {
const holder = tx.MPTokenHolder
const holder = tx.Holder

const filteredMptNode = meta.AffectedNodes.filter(
(node: any) => node.ModifiedNode?.LedgerEntryType === 'MPToken',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"Fee": "10",
"Flags": 2147483648,
"MPTokenHolder": "rUZTPFN7MBJkjiZ48rak6q7MbhT4ur2kAD",
"Holder": "rUZTPFN7MBJkjiZ48rak6q7MbhT4ur2kAD",
"Sequence": 3432,
"SigningPubKey": "ED0C1DE70A8762E6C98EC78CF13D278D6950ECDFE8E87BAD3732730845E2D9AB6A",
"TransactionType": "Clawback",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"Fee": "10",
"Flags": 2147483648,
"MPTokenHolder": "r9rAqX8Jjo4uACsimYDVsy5thHDPivujqf",
"Holder": "r9rAqX8Jjo4uACsimYDVsy5thHDPivujqf",
"Sequence": 4246,
"SigningPubKey": "ED4F6FF2241860884D4DD6C5797BDA553155D194F07B1BFC67129F183322DA7DC3",
"TransactionType": "Clawback",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Amount, ExplorerAmount } from '../../../types'

export interface Clawback extends TransactionCommonFields {
Amount: Amount
MPTokenHolder?: string
Holder?: string
}

export interface ClawbackInstructions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ import { MPTokenLink } from '../../MPTokenLink'
export const Simple: TransactionSimpleComponent = ({
data,
}: TransactionSimpleProps<MPTokenAuthorize>) => {
const { MPTokenIssuanceID, MPTokenHolder } = data.instructions
const { MPTokenIssuanceID, Holder } = data.instructions
const { t } = useTranslation()

return (
<>
<SimpleRow label={t('mpt_issuance_id')} data-test="mpt-issuance-id">
<MPTokenLink tokenID={MPTokenIssuanceID} />
</SimpleRow>
{MPTokenHolder && (
{Holder && (
<SimpleRow label={t('mpt_holder')} data-test="mpt-holder">
<Account account={MPTokenHolder} />
<Account account={Holder} />
</SimpleRow>
)}
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"Account": "rwfgw2dWqUAexB46z5QRq2dJcgTK9piw5w",
"Fee": "10",
"Flags": 2147483648,
"MPTokenHolder": "rK3bB9myvWoMaLbLnpksGx2Zz58BL225am",
"Holder": "rK3bB9myvWoMaLbLnpksGx2Zz58BL225am",
"MPTokenIssuanceID": "0000130B63FC523E33FDF4D1318D8D484B0D1111098CFD0B",
"Sequence": 4876,
"SigningPubKey": "ED936E848B8E37D20991C2E1C5C76ABAEC0625D693CEB85BA495B58E16712DA627",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"Account": "rL4pMQAa3V7s9QNw1wEk2znnhjbfYo4GQC",
"Fee": "10",
"Flags": 2147483648,
"MPTokenHolder": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"Holder": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"MPTokenIssuanceID": "00000F76D46440EE21F74E5B2398315BC1CFEB9A7EB48A14",
"Sequence": 3959,
"SigningPubKey": "EDF7A3D93CE3AA46168649283C20C2D4FC36642FDD87449F1CCF068638BF17B10E",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import { TransactionCommonFields } from '../types'

export interface MPTokenAuthorize extends TransactionCommonFields {
MPTokenIssuanceID: string
MPTokenHolder?: string
Holder?: string
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ import { MPTokenLink } from '../../MPTokenLink'
export const Simple: TransactionSimpleComponent = ({
data,
}: TransactionSimpleProps<MPTokenIssuanceSet>) => {
const { MPTokenIssuanceID, MPTokenHolder } = data.instructions
const { MPTokenIssuanceID, Holder } = data.instructions
const { t } = useTranslation()

return (
<>
<SimpleRow label={t('mpt_issuance_id')} data-test="mpt-issuance-id">
<MPTokenLink tokenID={MPTokenIssuanceID} />
</SimpleRow>
{MPTokenHolder && (
{Holder && (
<SimpleRow label={t('mpt_holder')} data-test="mpt-holder">
<Account account={MPTokenHolder} />
<Account account={Holder} />
</SimpleRow>
)}
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"Account": "rERyS9qtwky94UMMjjmbku3uo5aQwAoJ58",
"Fee": "10",
"Flags": 1,
"MPTokenHolder": "r9hF4e3e6kLuxLobPwfQa2wzXZMDvBDeUg",
"Holder": "r9hF4e3e6kLuxLobPwfQa2wzXZMDvBDeUg",
"MPTokenIssuanceID": "00000BED9E4ADA3DCC1BE78683C4B623A74013818160590C",
"Sequence": 3054,
"SigningPubKey": "EDF73A1C528F5BFBD6FF2B05D0C71760D7D2DF1DE3496935612E47BCB440F28040",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"Account": "rpizWPf4g8JLWFUT7143Zn9A1n2Dy9bnji",
"Fee": "10",
"Flags": 1,
"MPTokenHolder": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"Holder": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"MPTokenIssuanceID": "00000F83146C83112AED215CD345F8E7327459BFCF6B8062",
"Sequence": 3972,
"SigningPubKey": "ED4EC06184C745D99AEAAA16526C900DC181C8546899F462C3D105C11A6677A65A",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import { TransactionCommonFields } from '../types'

export interface MPTokenIssuanceSet extends TransactionCommonFields {
MPTokenIssuanceID: string
MPTokenHolder?: string
Holder?: string
}
Loading