Skip to content

Commit 473aae9

Browse files
committed
fix: payee indetity field populating
1 parent 5630b88 commit 473aae9

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

packages/create-invoice-form/src/lib/invoice/form-view.svelte

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
<div class="invoice-section">
136136
<p class="invoice-section-title">
137137
<span>From</span>
138-
{formData.payeeAddress}
138+
{formData.creatorId}
139139
</p>
140140
<div
141141
class={`invoice-details ${sellerInfo.length > 0 && "invoice-details-active"} `}
@@ -166,11 +166,14 @@
166166
</div>
167167
<p class="invoice-section-title">
168168
<span>Payment Chain</span>
169-
{currency?.network ? currency.network.charAt(0).toUpperCase() + currency.network.slice(1).toLowerCase() : ""}
169+
{currency?.network
170+
? currency.network.charAt(0).toUpperCase() +
171+
currency.network.slice(1).toLowerCase()
172+
: ""}
170173
</p>
171174
<p class="invoice-section-title">
172175
<span>Invoice Currency</span>
173-
{invoiceCurrency ? invoiceCurrency.symbol: ""}
176+
{invoiceCurrency ? invoiceCurrency.symbol : ""}
174177
</p>
175178
<p class="invoice-section-title">
176179
<span>Settlement Currency</span>

packages/create-invoice-form/src/lib/invoice/form.svelte

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
},
5151
};
5252
53-
let creatorId = formData.creatorId || "";
5453
let showPayeeAddressInput = false;
5554
5655
const validateEmail = (email: string, type: "sellerInfo" | "buyerInfo") => {
@@ -156,12 +155,12 @@
156155
const togglePayeeAddress = () => {
157156
showPayeeAddressInput = !showPayeeAddressInput;
158157
if (!showPayeeAddressInput) {
159-
formData.payeeAddress = creatorId;
158+
formData.payeeAddress = formData.creatorId;
160159
}
161160
};
162161
163-
$: if (!showPayeeAddressInput && creatorId) {
164-
formData.payeeAddress = creatorId;
162+
$: if (!showPayeeAddressInput && formData.creatorId) {
163+
formData.payeeAddress = formData.creatorId;
165164
}
166165
</script>
167166

@@ -187,7 +186,7 @@
187186
disabled
188187
id="creatorId"
189188
type="text"
190-
value={creatorId}
189+
value={formData.creatorId}
191190
label="From"
192191
placeholder="Connect wallet to populate"
193192
/>
@@ -430,13 +429,13 @@
430429
{config}
431430
placeholder="Settlement currency"
432431
selectedValue={currency
433-
? `${currency.symbol ?? 'Unknown'} (${currency?.network ?? 'Unknown'})`
432+
? `${currency.symbol ?? "Unknown"} (${currency?.network ?? "Unknown"})`
434433
: undefined}
435434
options={defaultCurrencies
436435
.filter((currency) => filterSettlementCurrencies(currency))
437436
.map((currency) => ({
438437
value: currency,
439-
label: `${currency.symbol ?? 'Unknown'} (${currency?.network ?? 'Unknown'})`,
438+
label: `${currency.symbol ?? "Unknown"} (${currency?.network ?? "Unknown"})`,
440439
}))}
441440
onchange={handleCurrencyChange}
442441
/>

0 commit comments

Comments
 (0)