complete checkin for juan; config tweaks & mock tweaks

This commit is contained in:
Tim Olson
2023-10-19 17:33:15 -04:00
parent dc23ecdd20
commit 6c268bba97
5 changed files with 8 additions and 8 deletions

View File

3
.gitignore vendored
View File

@@ -1,3 +1,4 @@
/.env
public/version.js
### JetBrains template
@@ -160,7 +161,7 @@ web_modules/
.yarn-integrity
# dotenv environment variables file
.env
.env-mock
.env.test
# parcel-bundler cache (https://parceljs.org/)

View File

@@ -82,11 +82,7 @@ export async function pendOrder(order) {
console.log('order', JSON.stringify(order))
const s = useStore()
s.pendingOrders.push(order)
const signer = await connectWallet()
if (!s.vaults.length)
socket.emit('ensureVault', s.chainId, await signer.getAddress(), 0)
else
flushOrders()
flushOrders()
}
@@ -107,6 +103,10 @@ export async function asyncFlushOrders() {
console.log('signer denied')
return
}
if (!s.vaults.length) {
socket.emit('ensureVault', s.chainId, await signer.getAddress(), 0)
return
}
const contract = await vaultContract(0, signer)
if (!contract) {
console.error(`no contract for vault 0 of ${signer.address}`)

View File

@@ -10,7 +10,6 @@
<script setup>
import {useStore} from "@/store/store";
import {connectWallet} from "@/blockchain/wallet.js";
const s = useStore()

View File

@@ -12,7 +12,7 @@ export const useStore = defineStore('app', {
pendingOrders: [], // created but not yet sent to metamask. maybe waiting on vault creation.
errors: [{
title: 'DANGER!',
text: 'This is early development (alpha) software, which could have severe bugs that lose all your money. Thank you for testing a SMALL amount!',
text: 'This is early development (alpha) software. There could be severe bugs that lose all your money. Thank you for testing a SMALL amount!',
closeable: false
}],
extraTokens: {},