complete checkin for juan; config tweaks & mock tweaks
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -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/)
|
||||
|
||||
@@ -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}`)
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
|
||||
<script setup>
|
||||
import {useStore} from "@/store/store";
|
||||
import {connectWallet} from "@/blockchain/wallet.js";
|
||||
|
||||
const s = useStore()
|
||||
|
||||
|
||||
@@ -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: {},
|
||||
|
||||
Reference in New Issue
Block a user