@meddleware/token-deployer-ui 0.0.19 → 0.0.21

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/README.md CHANGED
@@ -167,7 +167,8 @@ The Playwright mocked suite (`npm run test:e2e`) mocks all RPC in a dedicated e2
167
167
  (`npm run build:e2e`, `--mode e2e`; production builds refuse `VITE_E2E`), so it can prove
168
168
  the form/wallet/publish UI but **not** on-chain confirmation, the result panel, or the source
169
169
  download. The real-chain harness fills that gap. It is **manual** — never wired into automatic CI — because testnet/mainnet runs
170
- publish a real token and spend real SUI.
170
+ publish a real token and spend real SUI. The `e2e-realchain.yml` workflow runs testnet only; mainnet
171
+ runs only from your own machine, so no mainnet key is ever stored in CI.
171
172
 
172
173
  ```bash
173
174
  npm run e2e:localnet # fresh keypair, localnet faucet — no real funds; run this freely
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meddleware/token-deployer-ui",
3
- "version": "0.0.19",
3
+ "version": "0.0.21",
4
4
  "type": "module",
5
5
  "license": "0BSD",
6
6
  "repository": {
@@ -49,7 +49,7 @@
49
49
  },
50
50
  "dependencies": {
51
51
  "@meddleware/design-tokens": "^0.1.7",
52
- "@meddleware/sui-token-client": "^0.0.1",
52
+ "@meddleware/sui-token-client": "^0.0.2",
53
53
  "@meddleware/ui": "^0.1.28",
54
54
  "@meddleware/walrus-client": "^0.0.22",
55
55
  "@meddleware/walrus-relay": "^0.1.23",
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  // Lists the coins the connected wallet has deployed (owned TreasuryCap<T> objects). Read-only,
3
- // mirroring access-gate's "My Gates". Loads on mount + whenever the connected address changes.
3
+ // mirroring access-gate's "My Gates". Loads on mount and whenever the address or network changes.
4
4
  import { computed, ref, watch } from 'vue'
5
5
  import {
6
6
  CopyableAddress,
@@ -24,24 +24,33 @@ const tokens = ref<DeployedToken[]>([])
24
24
  const loading = ref(false)
25
25
  const error = ref<string | null>(null)
26
26
 
27
+ // Each load gets a number; a result that arrives after a newer load started (an account or network
28
+ // switch mid-request) is dropped, so one account's or network's tokens never show under another.
29
+ let latest = 0
30
+
27
31
  async function load(): Promise<void> {
32
+ const run = ++latest
28
33
  if (!props.owner) {
29
34
  tokens.value = []
35
+ error.value = null
36
+ loading.value = false
30
37
  return
31
38
  }
32
39
  loading.value = true
33
40
  error.value = null
34
41
  try {
35
- tokens.value = await listMyTokens(getReadClient(props.network), props.owner)
42
+ const found = await listMyTokens(getReadClient(props.network), props.owner)
43
+ if (run === latest) tokens.value = found
36
44
  } catch (e) {
45
+ if (run !== latest) return
37
46
  error.value = e instanceof Error ? e.message : String(e)
38
47
  tokens.value = []
39
48
  } finally {
40
- loading.value = false
49
+ if (run === latest) loading.value = false
41
50
  }
42
51
  }
43
52
 
44
- watch(() => props.owner, load, { immediate: true })
53
+ watch(() => [props.owner, props.network] as const, load, { immediate: true })
45
54
  defineExpose({ reload: load })
46
55
  </script>
47
56
 
@@ -9,7 +9,8 @@ import {
9
9
  hasAllowedIconScheme,
10
10
  isValidDecimals,
11
11
  parseSupply,
12
- validateIdentifier,
12
+ validateModuleName,
13
+ validatePackageName,
13
14
  type TokenConfig,
14
15
  } from '@meddleware/sui-token-client'
15
16
 
@@ -42,9 +43,9 @@ function textError(value: string, max: number, required: boolean): string | unde
42
43
  export function validateForm(form: ValidatableForm): FormErrors {
43
44
  const errors: FormErrors = {}
44
45
 
45
- const packageNameError = validateIdentifier(form.packageName)
46
+ const packageNameError = validatePackageName(form.packageName)
46
47
  if (packageNameError) errors.packageName = packageNameError
47
- const moduleNameError = validateIdentifier(form.moduleName)
48
+ const moduleNameError = validateModuleName(form.moduleName)
48
49
  if (moduleNameError) errors.moduleName = moduleNameError
49
50
 
50
51
  const symbol = textError(form.symbol, TOKEN_LIMITS.symbol, true)