Skip to content

Commit fa05ec3

Browse files
committed
rename ui
1 parent 46dae6c commit fa05ec3

File tree

3 files changed

+13
-24
lines changed

3 files changed

+13
-24
lines changed

packages/ui/src/zama/App.svelte

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
import hljs from './highlightjs';
55
6-
import ERC20Controls from './ERC20Controls.svelte';
6+
import ConfidentialFungibleControls from './ConfidentialFungibleControls.svelte';
77
import CopyIcon from '../common/icons/CopyIcon.svelte';
88
import CheckIcon from '../common/icons/CheckIcon.svelte';
99
import RemixIcon from '../common/icons/RemixIcon.svelte';
@@ -37,7 +37,7 @@
3737
showCode = true;
3838
}
3939
40-
export let initialTab: string | undefined = 'ERC20';
40+
export let initialTab: string | undefined = 'ConfidentialFungible';
4141
4242
export let tab: Kind = sanitizeKind(initialTab);
4343
$: {
@@ -63,7 +63,7 @@
6363
if (!initialValuesSet) {
6464
opts.name = initialOpts.name ?? opts.name;
6565
switch (opts.kind) {
66-
case 'ERC20':
66+
case 'ConfidentialFungible':
6767
opts.premint = initialOpts.premint ?? opts.premint;
6868
}
6969
initialValuesSet = true;
@@ -185,7 +185,9 @@
185185
<div class="header flex flex-row justify-between">
186186
<div class="tab overflow-hidden whitespace-nowrap">
187187
<OverflowMenu>
188-
<button class:selected={tab === 'ERC20'} on:click={() => (tab = 'ERC20')}> ERC20 </button>
188+
<button class:selected={tab === 'ConfidentialFungible'} on:click={() => (tab = 'ConfidentialFungible')}>
189+
ConfidentialFungible
190+
</button>
189191
</OverflowMenu>
190192
</div>
191193

@@ -264,8 +266,8 @@
264266
<div
265267
class="controls rounded-l-3xl min-w-72 w-72 max-w-[calc(100vw-420px)] flex flex-col shrink-0 justify-between h-[calc(100vh-84px)] overflow-auto resize-x"
266268
>
267-
<div class:hidden={tab !== 'ERC20'}>
268-
<ERC20Controls bind:opts={allOpts.ERC20} errors={errors.ERC20} />
269+
<div class:hidden={tab !== 'ConfidentialFungible'}>
270+
<ConfidentialFungibleControls bind:opts={allOpts.ConfidentialFungible} errors={errors.ConfidentialFungible} />
269271
</div>
270272
</div>
271273

packages/ui/src/zama/ERC20Controls.svelte renamed to packages/ui/src/zama/ConfidentialFungibleControls.svelte

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import HelpTooltip from '../common/HelpTooltip.svelte';
33
44
import type { KindedOptions, OptionsErrorMessages } from '@openzeppelin/wizard-zama';
5-
import { erc20, premintPattern, chainIdPattern, infoDefaults } from '@openzeppelin/wizard-zama';
5+
import { confidentialFungible, premintPattern, chainIdPattern, infoDefaults } from '@openzeppelin/wizard-zama';
66
77
import InfoSection from './InfoSection.svelte';
88
import ExpandableToggleRadio from '../common/ExpandableToggleRadio.svelte';
@@ -11,9 +11,9 @@
1111
import { resizeToFit } from '../common/resize-to-fit';
1212
import { superchainTooltipProps } from './superchain-tooltip';
1313
14-
export let opts: Required<KindedOptions['ERC20']> = {
15-
kind: 'ERC20',
16-
...erc20.defaults,
14+
export let opts: Required<KindedOptions['ConfidentialFungible']> = {
15+
kind: 'ConfidentialFungible',
16+
...confidentialFungible.defaults,
1717
premint: '', // default to empty premint in UI instead of 0
1818
info: { ...infoDefaults }, // create new object since Info is nested
1919
};
@@ -57,7 +57,6 @@
5757
</label>
5858
</div>
5959
</div>
60-
6160
</section>
6261

6362
<section class="controls-section">
@@ -77,7 +76,7 @@
7776
bind:value={opts.votes}
7877
defaultValue="blocknumber"
7978
helpContent="Keeps track of historical balances for voting in on-chain governance, with a way to delegate one's voting power to a trusted account."
80-
helpLink="https://docs.openzeppelin.com/contracts/api/token/erc20#ERC20Votes"
79+
helpLink="https://docs.openzeppelin.com/contracts/api/token/confidentialFungible#ConfidentialFungibleVotes"
8180
>
8281
<div class="checkbox-group">
8382
<label class:checked={opts.votes === 'blocknumber'}>

packages/ui/src/zama/superchain-tooltip.ts

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)