From a226cb3fa0515c56827183d366f98822fcbb2203 Mon Sep 17 00:00:00 2001 From: pskfyi Date: Tue, 11 Jan 2022 20:24:49 -0800 Subject: [PATCH] fix: creating instruments costs money --- pages/index.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pages/index.vue b/pages/index.vue index aa309ee..30a2a5e 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -7,7 +7,7 @@ :label="process.instrument" :max="process.cost" :value="$store.state.currency" - @click="create(process.instrument)" + @click="create(process)" /> @@ -35,8 +35,9 @@ export default { }, }, methods: { - create(instrument) { - this.$store.commit('createInstrument', instrument) + create(process) { + this.$store.commit('createInstrument', process.instrument) + this.$store.commit('spendCurrency', process.cost) }, }, }