diff --git a/src/blockchain/wallet.js b/src/blockchain/wallet.js index 9e46aca..352ecf7 100644 --- a/src/blockchain/wallet.js +++ b/src/blockchain/wallet.js @@ -153,7 +153,16 @@ export async function connectWallet(chainId) { await updateAccounts(chainId, p) } catch (e) { - if (e.reason!=='rejected') { + console.log('connectWallet error', e.reason, e) + if (e.reason==='rejected') { + const ws = useWalletStore(); + const tx = ws.transaction + if (tx) { + tx.state = TransactionState.Rejected + ws.transaction = null + } + } + else { console.error(e, e.reason) throw e } diff --git a/src/charts/chart.js b/src/charts/chart.js index 437e863..5c5816c 100644 --- a/src/charts/chart.js +++ b/src/charts/chart.js @@ -184,7 +184,8 @@ function initChart() { chart.onIntervalChanged().subscribe(null, changeInterval) chart.onDataLoaded().subscribe(null, dataLoaded) const tzapi = chart.getTimezoneApi(); - tzapi.onTimezoneChanged().subscribe(null, (tz)=>{if (tz==='exchange') tz='Etc/UTC'; prefs.timezone=tz;}) + tzapi.onTimezoneChanged().subscribe(null, (tz)=>{if (tz==='exchange') tz='Etc/UTC'; s.timeZone=tz}) + s.timeZone = tzapi.getTimezone().id // chart.onHoveredSourceChanged().subscribe(null, ()=>console.log('hovered source changed', arguments)) // chart.selection().onChanged().subscribe(null, s => console.log('selection', chart.selection().allSources())); const symbolExt = chart.symbolExt(); @@ -358,7 +359,7 @@ function doHandleCrosshairMovement(point) { const points = structuredClone(shape.getPoints()); const lpbe = shape._model._linePointBeingEdited points[lpbe] = point - // console.log('drag calling onPoints', points, shape, lpbe) + // console.log('calling onDrag', points, shape) invokeCallbacks(shapeCallbacks[shapeId], 'onDrag', shapeId, shape, points) } } diff --git a/src/components/chart/ChartPlaceOrder.vue b/src/components/chart/ChartPlaceOrder.vue index 64f8690..2993b11 100644 --- a/src/components/chart/ChartPlaceOrder.vue +++ b/src/components/chart/ChartPlaceOrder.vue @@ -157,6 +157,7 @@ async function placeOrder() { async function doPlaceOrder() { console.log('place orders') + showWarnings.value = false if (ws.transaction!==null) { console.error('Transaction already in progress') } diff --git a/src/components/chart/DiagonalBuilder.vue b/src/components/chart/DiagonalBuilder.vue index 50f4d69..6ba4331 100644 --- a/src/components/chart/DiagonalBuilder.vue +++ b/src/components/chart/DiagonalBuilder.vue @@ -6,7 +6,7 @@ :set-values="setLines" :set-weights="setWeights" :set-shapes="setShapes" :std-width="stdWidth" :build-tranches="buildTranches"> -
| diff --git a/src/components/chart/RungBuilder.vue b/src/components/chart/RungBuilder.vue index b0d0e15..6382f04 100644 --- a/src/components/chart/RungBuilder.vue +++ b/src/components/chart/RungBuilder.vue @@ -23,16 +23,18 @@ |