create-sia-app 0.1.5 → 0.1.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-sia-app",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "create-sia-app": "./dist/index.js"
@@ -19,21 +19,17 @@ export function ApproveScreen({
19
19
 
20
20
  async function poll() {
21
21
  const b = builder.current
22
- if (!b) {
23
- setError('No builder instance')
24
- return
25
- }
22
+ if (!b) return
26
23
 
27
24
  try {
28
25
  await b.waitForApproval()
29
26
  if (!cancelled) {
30
27
  setStep('recovery')
31
28
  }
32
- } catch (e) {
29
+ } catch {
33
30
  if (!cancelled) {
34
31
  setPolling(false)
35
32
  setPollError(true)
36
- console.error('Approval polling error:', e)
37
33
  }
38
34
  }
39
35
  }
@@ -42,7 +38,7 @@ export function ApproveScreen({
42
38
  return () => {
43
39
  cancelled = true
44
40
  }
45
- }, [builder, setStep, setError])
41
+ }, [builder, setStep])
46
42
 
47
43
  async function handleManualCheck() {
48
44
  const b = builder.current
@@ -60,7 +56,7 @@ export function ApproveScreen({
60
56
  } catch (e) {
61
57
  setPolling(false)
62
58
  setPollError(true)
63
- console.error('Approval polling error:', e)
59
+ setError(e instanceof Error ? e.message : 'Approval check failed')
64
60
  } finally {
65
61
  setManualChecking(false)
66
62
  }
@@ -107,22 +103,6 @@ export function ApproveScreen({
107
103
  </div>
108
104
  )}
109
105
 
110
- <div className="flex items-center justify-center gap-2 text-sm text-neutral-400">
111
- {polling ? (
112
- <>
113
- <span className="relative flex h-2 w-2">
114
- <span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-green-400 opacity-75" />
115
- <span className="relative inline-flex rounded-full h-2 w-2 bg-green-500" />
116
- </span>
117
- Waiting for approval...
118
- </>
119
- ) : pollError ? (
120
- <span className="text-neutral-500">
121
- Auto-polling stopped.
122
- </span>
123
- ) : null}
124
- </div>
125
-
126
106
  <button
127
107
  type="button"
128
108
  onClick={handleManualCheck}
@@ -138,6 +118,20 @@ export function ApproveScreen({
138
118
  'Check Approval'
139
119
  )}
140
120
  </button>
121
+
122
+ <div className="flex items-center justify-center gap-2 text-xs text-neutral-600">
123
+ {polling ? (
124
+ <>
125
+ <span className="relative flex h-1.5 w-1.5">
126
+ <span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-green-400 opacity-75" />
127
+ <span className="relative inline-flex rounded-full h-1.5 w-1.5 bg-green-500" />
128
+ </span>
129
+ Polling for approval...
130
+ </>
131
+ ) : pollError ? (
132
+ <span>Auto-polling stopped</span>
133
+ ) : null}
134
+ </div>
141
135
  </div>
142
136
  </div>
143
137
  )