@meddleware/token-deployer-ui 0.0.18 → 0.0.20
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 +2 -1
- package/package.json +3 -3
- package/src/components/MyTokens.vue +13 -4
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.
|
|
3
|
+
"version": "0.0.20",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "0BSD",
|
|
6
6
|
"repository": {
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@meddleware/sui-token-client": "^0.0.1",
|
|
53
53
|
"@meddleware/ui": "^0.1.28",
|
|
54
54
|
"@meddleware/walrus-client": "^0.0.22",
|
|
55
|
-
"@meddleware/walrus-relay": "^0.1.
|
|
55
|
+
"@meddleware/walrus-relay": "^0.1.23",
|
|
56
56
|
"@mysten/move-bytecode-template": "~0.4.1",
|
|
57
57
|
"@mysten/sui": "^2.33.1",
|
|
58
58
|
"@mysten/walrus": "~1.2.32",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"@meddleware/wallet-adapter": ">=0.0.12 <0.2.0"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@meddleware/access-gate-client": "^0.0.
|
|
65
|
+
"@meddleware/access-gate-client": "^0.0.3",
|
|
66
66
|
"@meddleware/wallet-adapter": "^0.0.12",
|
|
67
67
|
"@playwright/test": "^1.56.0",
|
|
68
68
|
"@types/node": "~24.12.2",
|
|
@@ -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
|
|
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
|
-
|
|
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
|
|