Skip to content

Commit 09a9be8

Browse files
committed
remove import of LitActionPriceComponent
1 parent cf4fa5d commit 09a9be8

File tree

2 files changed

+45
-2
lines changed

2 files changed

+45
-2
lines changed

docs/snippets/CurrentPricesTable.jsx

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { weiToTokens, formatPrice, LitActionPriceComponent, NodePriceMeasurement } from './PriceProvider';
1+
import { weiToTokens, formatPrice } from './PriceProvider';
22

33
export const CurrentPricesTable = ({ priceData }) => {
44
// Product IDs
@@ -17,6 +17,28 @@ export const CurrentPricesTable = ({ priceData }) => {
1717
ProductId.SignSessionKey,
1818
];
1919

20+
// LitActionPriceComponent enum values
21+
const LitActionPriceComponent = {
22+
baseAmount: 0,
23+
runtimeLength: 1,
24+
memoryUsage: 2,
25+
codeLength: 3,
26+
responseLength: 4,
27+
signatures: 5,
28+
broadcasts: 6,
29+
contractCalls: 7,
30+
callDepth: 8,
31+
decrypts: 9,
32+
fetches: 10,
33+
};
34+
35+
// NodePriceMeasurement enum values
36+
const NodePriceMeasurement = {
37+
perSecond: 0,
38+
perMegabyte: 1,
39+
perCount: 2,
40+
};
41+
2042
const PRODUCT_NAMES = {
2143
[ProductId.PkpSign]: 'PKP Sign',
2244
[ProductId.EncSign]: 'Encrypted Sign',

docs/snippets/ExampleLitActionCosts.jsx

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,27 @@
1-
import { weiToTokens, formatPrice, LitActionPriceComponent, NodePriceMeasurement } from './PriceProvider';
1+
import { weiToTokens, formatPrice } from './PriceProvider';
22

33
export const ExampleLitActionCosts = ({ priceData }) => {
4+
// LitActionPriceComponent enum values
5+
const LitActionPriceComponent = {
6+
baseAmount: 0,
7+
runtimeLength: 1,
8+
memoryUsage: 2,
9+
codeLength: 3,
10+
responseLength: 4,
11+
signatures: 5,
12+
broadcasts: 6,
13+
contractCalls: 7,
14+
callDepth: 8,
15+
decrypts: 9,
16+
fetches: 10,
17+
};
18+
19+
// NodePriceMeasurement enum values
20+
const NodePriceMeasurement = {
21+
perSecond: 0,
22+
perMegabyte: 1,
23+
perCount: 2,
24+
};
425
if (!priceData) {
526
return (
627
<div style={{ padding: '20px', textAlign: 'center' }}>

0 commit comments

Comments
 (0)