diff --git a/components/Transaction/ui.tsx b/components/Transaction/ui.tsx index 80c78d4..b69fccd 100644 --- a/components/Transaction/ui.tsx +++ b/components/Transaction/ui.tsx @@ -19,7 +19,7 @@ import Textarea from '../Textarea' import { getFlags } from '../../state/constants/flags' import { Plus, Trash } from 'phosphor-react' import AccountSequence from '../Sequence' -import { typeIs } from '../../utils/helpers' +import { capitalize, typeIs } from '../../utils/helpers' interface UIProps { setState: (pTx?: Partial | undefined) => TransactionState | undefined @@ -266,7 +266,8 @@ export const TxUI: FC = ({ { + placeholder="Issuer" + setField={(_, value = '') => { setRawField(field, 'amount.token', { ...tokenAmount, issuer: value @@ -529,8 +530,9 @@ export const TxUI: FC = ({ export const CreatableAccount: FC<{ value: string | undefined field: keyof TxFields + placeholder?: string setField: (field: keyof TxFields, value: string, opFields?: TxFields) => void -}> = ({ value, field, setField }) => { +}> = ({ value, field, setField, placeholder }) => { const { accounts } = useSnapshot(state) const accountOptions: SelectOption[] = accounts.map(acc => ({ label: acc.name, @@ -541,11 +543,12 @@ export const CreatableAccount: FC<{ value, label } + placeholder = placeholder || `${capitalize(field)} account` return ( setField(field, acc?.value)} diff --git a/content/transactions.json b/content/transactions.json index 91d4de1..355ac09 100644 --- a/content/transactions.json +++ b/content/transactions.json @@ -4,7 +4,7 @@ "Account": "rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm", "Destination": { "$type": "account", - "$value": "rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe" + "$value": "" }, "DestinationTag": 13, "Fee": "2000000", @@ -45,7 +45,7 @@ "Account": "rUn84CUYbNjRoTQ6mSW7BVJPSVJNLb1QLo", "Destination": { "$type": "account", - "$value": "rfkE1aSy9G8Upk4JssnwBxhEv5p4mn2KTy" + "$value": "" }, "SendMax": "100000000", "Expiration": 570113521, @@ -66,7 +66,7 @@ "TransactionType": "EscrowCancel", "Owner": { "$type": "account", - "$value": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn" + "$value": "" }, "OfferSequence": 7, "Fee": "10" @@ -80,7 +80,7 @@ }, "Destination": { "$type": "account", - "$value": "rsA2LpzuawewSBQXkiju3YQTMzW13pAAdW" + "$value": "" }, "CancelAfter": 533257958, "FinishAfter": 533171558, @@ -94,7 +94,7 @@ "TransactionType": "EscrowFinish", "Owner": { "$type": "account", - "$value": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn" + "$value": "" }, "OfferSequence": 7, "Condition": "A0258020E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855810100", @@ -186,7 +186,7 @@ "Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", "Destination": { "$type": "account", - "$value": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX" + "$value": "" }, "Amount": { "$value": "100", @@ -205,7 +205,7 @@ }, "Destination": { "$type": "account", - "$value": "rsA2LpzuawewSBQXkiju3YQTMzW13pAAdW" + "$value": "" }, "SettleDelay": 86400, "PublicKey": "32D2471DB72B27E3310F355BB33E339BF26F8392D5A93D3BC0FC3B566612DA0F0A",