Skip to content

Commit 3bd4b92

Browse files
committed
Run format
1 parent 0a75347 commit 3bd4b92

File tree

8 files changed

+440
-395
lines changed

8 files changed

+440
-395
lines changed

public/trials.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const otMeta = document.createElement('meta');
22
otMeta.httpEquiv = 'origin-trial';
3-
otMeta.content = 'Ayfl4fp/WFo5HSyGVliYl2bnpkL3Pa+wm2xyHbpTP5V0kHgpba2f8WZz0lOJnr0dDRk6PIpkOl4NIfhEyJSq7wUAAACYeyJvcmlnaW4iOiJodHRwczovL3d3dy5zdG9pY3dhbGxldC5jb206NDQzIiwiZmVhdHVyZSI6IkRpc2FibGVUaGlyZFBhcnR5U3RvcmFnZVBhcnRpdGlvbmluZyIsImV4cGlyeSI6MTcyNTQwNzk5OSwiaXNTdWJkb21haW4iOnRydWUsImlzVGhpcmRQYXJ0eSI6dHJ1ZX0=';
4-
document.head.append(otMeta);
3+
otMeta.content =
4+
'Ayfl4fp/WFo5HSyGVliYl2bnpkL3Pa+wm2xyHbpTP5V0kHgpba2f8WZz0lOJnr0dDRk6PIpkOl4NIfhEyJSq7wUAAACYeyJvcmlnaW4iOiJodHRwczovL3d3dy5zdG9pY3dhbGxldC5jb206NDQzIiwiZmVhdHVyZSI6IkRpc2FibGVUaGlyZFBhcnR5U3RvcmFnZVBhcnRpdGlvbmluZyIsImV4cGlyeSI6MTcyNTQwNzk5OSwiaXNTdWJkb21haW4iOnRydWUsImlzVGhpcmRQYXJ0eSI6dHJ1ZX0=';
5+
document.head.append(otMeta);

src/components/Detail.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,8 @@ const Detail = props => {
351351
// }
352352

353353
if (index == 99 && canister == 'kss7i-hqaaa-aaaah-qbvmq-cai')
354-
detailPage = 'interactive_nfts_or_videos';
355-
354+
detailPage = 'interactive_nfts_or_videos';
355+
356356
if (index >= 9 && index <= 19 && canister == 'yy7m6-daaaa-aaaag-qciqa-cai')
357357
detailPage = 'interactive_nfts_or_videos';
358358

src/components/UserCollection.js

+10-10
Original file line numberDiff line numberDiff line change
@@ -376,18 +376,18 @@ export default function UserCollection(props) {
376376
break;
377377
case 'favorites':
378378
// var r = await extjs
379-
// .connect('https://icp0.io/', props.identity)
380-
// .canister('6z5wo-yqaaa-aaaah-qcsfa-cai')
381-
// .liked();
379+
// .connect('https://icp0.io/', props.identity)
380+
// .canister('6z5wo-yqaaa-aaaah-qcsfa-cai')
381+
// .liked();
382382
// data = r.filter((a, i) => r.indexOf(a) == i);
383383
// data = data.map(a => ({
384-
// id: a,
385-
// token: a,
386-
// price: 0,
387-
// time: 0,
388-
// owner: false,
389-
// canister: extjs.decodeTokenId(a).canister,
390-
// listing: null,
384+
// id: a,
385+
// token: a,
386+
// price: 0,
387+
// time: 0,
388+
// owner: false,
389+
// canister: extjs.decodeTokenId(a).canister,
390+
// listing: null,
391391
// }));
392392
break;
393393
case 'offers-made':

src/components/Wallet.js

+78-55
Original file line numberDiff line numberDiff line change
@@ -276,64 +276,87 @@ export default function Wallet(props) {
276276
<ListItemText primary="Logout" />
277277
</MenuItem>
278278
</Menu>
279-
<ListItem style={{ display: 'flex', flexDirection: 'column', justifyContent: 'center', alignItems: 'center' }}>
280-
<Typography style={{ width: '100%', textAlign: 'center' }}>
281-
<PriceICP
282-
volume={true}
283-
loader={balance === false || (loadedAccount === 0 && loading === true)}
284-
price={
285-
balance === false
286-
? false
287-
: Number(balance) + (voltBalances && loadedAccount === 0 ? voltBalances[0] : 0)
288-
}
289-
/>
290-
<br />
291-
</Typography>
292-
293-
{/* Move the hr outside of Typography */}
294-
{loadedAccount === 0 && balance !== false && loading === false && voltPrincipal ? (
295-
<>
296-
<hr style={{ width: '100%', borderBottom: '1px solid grey' }} />
297-
298-
<Typography style={{ width: '100%', textAlign: 'center' }}>
279+
<ListItem
280+
style={{
281+
display: 'flex',
282+
flexDirection: 'column',
283+
justifyContent: 'center',
284+
alignItems: 'center',
285+
}}
286+
>
287+
<Typography style={{width: '100%', textAlign: 'center'}}>
299288
<PriceICP
300-
bold={false}
301-
volume={true}
302-
text={
303-
balance === false ? (
304-
<ToniqIcon
305-
className="toniq-icon-fit-icon"
306-
style={{ height: '14px', width: '14px' }}
307-
icon={LoaderAnimated24Icon}
308-
/>
309-
) : undefined
310-
}
311-
price={balance}
312-
>
313-
Wallet
314-
</PriceICP>
315-
<br />
316-
<PriceICP bold={false} volume={true} loader={voltBalances === false} price={voltBalances[0] - voltBalances[2]}>
317-
Volt
318-
</PriceICP>
289+
volume={true}
290+
loader={
291+
balance === false || (loadedAccount === 0 && loading === true)
292+
}
293+
price={
294+
balance === false
295+
? false
296+
: Number(balance) +
297+
(voltBalances && loadedAccount === 0
298+
? voltBalances[0]
299+
: 0)
300+
}
301+
/>
319302
<br />
320-
{voltBalances && voltBalances[2] > 0 ? (
321-
<>
322-
<PriceICP bold={false} volume={true} price={voltBalances[2]}>
323-
Locked
324-
</PriceICP>
325-
<br />
326-
</>
327-
) : (
328-
''
329-
)}
330-
</Typography>
331-
</>
332-
) : (
333-
''
334-
)}
335-
</ListItem>
303+
</Typography>
304+
305+
{/* Move the hr outside of Typography */}
306+
{loadedAccount === 0 &&
307+
balance !== false &&
308+
loading === false &&
309+
voltPrincipal ? (
310+
<>
311+
<hr style={{width: '100%', borderBottom: '1px solid grey'}} />
336312

313+
<Typography style={{width: '100%', textAlign: 'center'}}>
314+
<PriceICP
315+
bold={false}
316+
volume={true}
317+
text={
318+
balance === false ? (
319+
<ToniqIcon
320+
className="toniq-icon-fit-icon"
321+
style={{height: '14px', width: '14px'}}
322+
icon={LoaderAnimated24Icon}
323+
/>
324+
) : undefined
325+
}
326+
price={balance}
327+
>
328+
Wallet
329+
</PriceICP>
330+
<br />
331+
<PriceICP
332+
bold={false}
333+
volume={true}
334+
loader={voltBalances === false}
335+
price={voltBalances[0] - voltBalances[2]}
336+
>
337+
Volt
338+
</PriceICP>
339+
<br />
340+
{voltBalances && voltBalances[2] > 0 ? (
341+
<>
342+
<PriceICP
343+
bold={false}
344+
volume={true}
345+
price={voltBalances[2]}
346+
>
347+
Locked
348+
</PriceICP>
349+
<br />
350+
</>
351+
) : (
352+
''
353+
)}
354+
</Typography>
355+
</>
356+
) : (
357+
''
358+
)}
359+
</ListItem>
337360

338361
{loading == false && loadedAccount === 0 ? (
339362
<ListItem>

src/ic/extjs.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* global BigInt */
22
import {Actor, HttpAgent} from '@dfinity/agent';
33
import {Principal} from '@dfinity/principal';
4-
import { IDL } from '@dfinity/candid';
4+
import {IDL} from '@dfinity/candid';
55
import {
66
LEDGER_CANISTER_ID,
77
GOVERNANCE_CANISTER_ID,
@@ -153,7 +153,7 @@ for (const a in tokensToLoad) {
153153
}
154154
function isQueryCall(idlFactory, methodName) {
155155
// Parse the IDL using the provided factory function
156-
const idl = idlFactory({ IDL });
156+
const idl = idlFactory({IDL});
157157

158158
// Retrieve the method definition by its name
159159
const method = idl._fields.find(([name]) => name === methodName);
@@ -177,7 +177,7 @@ function createLoggingActor(actor, idl) {
177177
// Check if the property is a function (i.e., a method call)
178178
if (typeof origMethod === 'function') {
179179
return async function (...args) {
180-
const iqc = isQueryCall(idl, propKey);//propKey.startsWith("query");
180+
const iqc = isQueryCall(idl, propKey); //propKey.startsWith("query");
181181
//console.log(`Standard Actor: Calling ${iqc} method: ${propKey}`, 'with arguments:', args);
182182
const result = await origMethod.apply(target, args);
183183
//console.log(`Result from ${iqc} method: ${propKey}`, result);
@@ -187,7 +187,7 @@ function createLoggingActor(actor, idl) {
187187

188188
// If not a function, just return the original property
189189
return origMethod;
190-
}
190+
},
191191
});
192192
}
193193
class VirtualActor {

0 commit comments

Comments
 (0)