@pollar/react 0.12.1-rc.13 → 0.12.1-rc.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +43 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +51 -1
- package/dist/index.d.ts +51 -1
- package/dist/index.js +355 -98
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +355 -98
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -1276,6 +1276,46 @@ interface TransactionModalTemplateProps {
|
|
|
1276
1276
|
}
|
|
1277
1277
|
declare function TransactionModalTemplate({ theme, accentColor, styleOverrides, transaction, showXdr, copied, explorerUrl, walletType, onClose, onSignAndSend, onToggleXdr, onCopyHash, onRetry, language: languageProp, }: TransactionModalTemplateProps): react_jsx_runtime.JSX.Element;
|
|
1278
1278
|
|
|
1279
|
+
/** One end of the flow: a wallet, an account or a contract, and what it sends or gets. */
|
|
1280
|
+
interface TxParty {
|
|
1281
|
+
chain?: WalletChain;
|
|
1282
|
+
asset?: string;
|
|
1283
|
+
amount?: string;
|
|
1284
|
+
/** The amount is a floor: a swap delivers at least it. */
|
|
1285
|
+
minimum?: boolean;
|
|
1286
|
+
address?: string;
|
|
1287
|
+
label?: string;
|
|
1288
|
+
/** One of the user's own wallets. */
|
|
1289
|
+
self?: boolean;
|
|
1290
|
+
}
|
|
1291
|
+
interface TxDetailRow {
|
|
1292
|
+
label: string;
|
|
1293
|
+
value: string;
|
|
1294
|
+
/** What the copy button copies; the row has none when absent. */
|
|
1295
|
+
copyValue?: string;
|
|
1296
|
+
mono?: boolean;
|
|
1297
|
+
}
|
|
1298
|
+
interface TxReviewData {
|
|
1299
|
+
/** The action in plain words: what a user without crypto background reads first. */
|
|
1300
|
+
title: string;
|
|
1301
|
+
kind: 'send' | 'bridge' | 'approve' | 'swap' | 'payment' | 'create_account' | 'deposit' | 'withdraw' | 'other';
|
|
1302
|
+
from?: TxParty;
|
|
1303
|
+
to?: TxParty;
|
|
1304
|
+
/**
|
|
1305
|
+
* Who pays the network fee: after the signature, as the platform reported it;
|
|
1306
|
+
* before, only when the transaction itself makes the app pay (`appPaysFee`).
|
|
1307
|
+
*/
|
|
1308
|
+
fee?: {
|
|
1309
|
+
sponsored: boolean;
|
|
1310
|
+
};
|
|
1311
|
+
rows: TxDetailRow[];
|
|
1312
|
+
raw?: string;
|
|
1313
|
+
hash?: {
|
|
1314
|
+
value: string;
|
|
1315
|
+
explorerUrl: string | null;
|
|
1316
|
+
};
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1279
1319
|
interface TxStatusViewProps {
|
|
1280
1320
|
transaction: TransactionState;
|
|
1281
1321
|
/** Whether the details (addresses, network, fee, raw transaction, hash) are unfolded. */
|
|
@@ -1293,8 +1333,18 @@ interface TxStatusViewProps {
|
|
|
1293
1333
|
onDone: () => void;
|
|
1294
1334
|
/** Language of the status text. Defaults to the user's device; the modals pass the resolved one. */
|
|
1295
1335
|
language?: PollarLanguage | undefined;
|
|
1336
|
+
/**
|
|
1337
|
+
* The operation as the modal knows it (an Earn deposit names its opportunity),
|
|
1338
|
+
* drawn instead of the build's summary. The hash and who paid the fee still
|
|
1339
|
+
* come from the transaction.
|
|
1340
|
+
*/
|
|
1341
|
+
review?: TxReviewData | null | undefined;
|
|
1342
|
+
/** What the success says instead of the generic "sent" line. */
|
|
1343
|
+
successMessage?: string | undefined;
|
|
1344
|
+
/** Shown under the review once the transaction succeeds, above Done. */
|
|
1345
|
+
successExtra?: ReactNode;
|
|
1296
1346
|
}
|
|
1297
|
-
declare function TxStatusView({ transaction, showXdr, explorerUrl, walletType, onSignAndSend, onToggleXdr, onRetry, onDone, language: languageProp, }: TxStatusViewProps): react_jsx_runtime.JSX.Element;
|
|
1347
|
+
declare function TxStatusView({ transaction, showXdr, explorerUrl, walletType, onSignAndSend, onToggleXdr, onRetry, onDone, language: languageProp, review: reviewProp, successMessage, successExtra, }: TxStatusViewProps): react_jsx_runtime.JSX.Element;
|
|
1298
1348
|
|
|
1299
1349
|
interface TxHistoryModalTemplateProps {
|
|
1300
1350
|
theme: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1276,6 +1276,46 @@ interface TransactionModalTemplateProps {
|
|
|
1276
1276
|
}
|
|
1277
1277
|
declare function TransactionModalTemplate({ theme, accentColor, styleOverrides, transaction, showXdr, copied, explorerUrl, walletType, onClose, onSignAndSend, onToggleXdr, onCopyHash, onRetry, language: languageProp, }: TransactionModalTemplateProps): react_jsx_runtime.JSX.Element;
|
|
1278
1278
|
|
|
1279
|
+
/** One end of the flow: a wallet, an account or a contract, and what it sends or gets. */
|
|
1280
|
+
interface TxParty {
|
|
1281
|
+
chain?: WalletChain;
|
|
1282
|
+
asset?: string;
|
|
1283
|
+
amount?: string;
|
|
1284
|
+
/** The amount is a floor: a swap delivers at least it. */
|
|
1285
|
+
minimum?: boolean;
|
|
1286
|
+
address?: string;
|
|
1287
|
+
label?: string;
|
|
1288
|
+
/** One of the user's own wallets. */
|
|
1289
|
+
self?: boolean;
|
|
1290
|
+
}
|
|
1291
|
+
interface TxDetailRow {
|
|
1292
|
+
label: string;
|
|
1293
|
+
value: string;
|
|
1294
|
+
/** What the copy button copies; the row has none when absent. */
|
|
1295
|
+
copyValue?: string;
|
|
1296
|
+
mono?: boolean;
|
|
1297
|
+
}
|
|
1298
|
+
interface TxReviewData {
|
|
1299
|
+
/** The action in plain words: what a user without crypto background reads first. */
|
|
1300
|
+
title: string;
|
|
1301
|
+
kind: 'send' | 'bridge' | 'approve' | 'swap' | 'payment' | 'create_account' | 'deposit' | 'withdraw' | 'other';
|
|
1302
|
+
from?: TxParty;
|
|
1303
|
+
to?: TxParty;
|
|
1304
|
+
/**
|
|
1305
|
+
* Who pays the network fee: after the signature, as the platform reported it;
|
|
1306
|
+
* before, only when the transaction itself makes the app pay (`appPaysFee`).
|
|
1307
|
+
*/
|
|
1308
|
+
fee?: {
|
|
1309
|
+
sponsored: boolean;
|
|
1310
|
+
};
|
|
1311
|
+
rows: TxDetailRow[];
|
|
1312
|
+
raw?: string;
|
|
1313
|
+
hash?: {
|
|
1314
|
+
value: string;
|
|
1315
|
+
explorerUrl: string | null;
|
|
1316
|
+
};
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1279
1319
|
interface TxStatusViewProps {
|
|
1280
1320
|
transaction: TransactionState;
|
|
1281
1321
|
/** Whether the details (addresses, network, fee, raw transaction, hash) are unfolded. */
|
|
@@ -1293,8 +1333,18 @@ interface TxStatusViewProps {
|
|
|
1293
1333
|
onDone: () => void;
|
|
1294
1334
|
/** Language of the status text. Defaults to the user's device; the modals pass the resolved one. */
|
|
1295
1335
|
language?: PollarLanguage | undefined;
|
|
1336
|
+
/**
|
|
1337
|
+
* The operation as the modal knows it (an Earn deposit names its opportunity),
|
|
1338
|
+
* drawn instead of the build's summary. The hash and who paid the fee still
|
|
1339
|
+
* come from the transaction.
|
|
1340
|
+
*/
|
|
1341
|
+
review?: TxReviewData | null | undefined;
|
|
1342
|
+
/** What the success says instead of the generic "sent" line. */
|
|
1343
|
+
successMessage?: string | undefined;
|
|
1344
|
+
/** Shown under the review once the transaction succeeds, above Done. */
|
|
1345
|
+
successExtra?: ReactNode;
|
|
1296
1346
|
}
|
|
1297
|
-
declare function TxStatusView({ transaction, showXdr, explorerUrl, walletType, onSignAndSend, onToggleXdr, onRetry, onDone, language: languageProp, }: TxStatusViewProps): react_jsx_runtime.JSX.Element;
|
|
1347
|
+
declare function TxStatusView({ transaction, showXdr, explorerUrl, walletType, onSignAndSend, onToggleXdr, onRetry, onDone, language: languageProp, review: reviewProp, successMessage, successExtra, }: TxStatusViewProps): react_jsx_runtime.JSX.Element;
|
|
1298
1348
|
|
|
1299
1349
|
interface TxHistoryModalTemplateProps {
|
|
1300
1350
|
theme: string;
|