Skip to content

Commit

Permalink
removed code and balance acc fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
matt5346 committed Mar 7, 2022
1 parent 0687d39 commit cd46bae
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 37 deletions.
2 changes: 1 addition & 1 deletion frontend/src/nearConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export async function initContract() {

// Getting the Account ID. If still unauthorized, it's just empty string
window.accountId = window.walletConnection.getAccountId()
const acc = await near.account("near_testing.testnet")
const acc = await near.account(window.accountId)
const balance = await acc.getAccountBalance()
const amountInNEAR = utils.format.formatNearAmount(balance.total)
window.balance = amountInNEAR
Expand Down
36 changes: 0 additions & 36 deletions frontend/src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ import Router from 'vue-router'
import Home from '../views/Home'
import ChooseNFT from "../views/ChooseNFT"
import SendNFT from "../views/SendNFT"
// import ChooseEffect from "../views/ChooseEffect"
// import Minting from "../views/Minting"
// import WrapNFTS from "../views/WrapNFTS"
// import Unwrap from "../views/Unwrap"
const { providers } = require("near-api-js")
import store, { Status } from "../store"

Expand Down Expand Up @@ -36,46 +32,15 @@ let routes = [
component: SendNFT,
meta: { title: 'Do[NFT]', requiresAuth: true }
},
// {
// path: '/wrap',
// name: 'WrapNFTS',
// component: WrapNFTS,
// meta: { title: 'Do[NFT]' }
// },
// {
// path: '/unwrap',
// name: 'Unwrap',
// component: Unwrap,
// meta: { title: 'Do[NFT]' }
// }
]

// if (process.env.VUE_APP_EFFECTS_ENABLED === 'true') {
// routes.push(...[
// {
// path: '/choose_modification',
// name: 'ChooseEffect',
// component: ChooseEffect,
// meta: { title: 'Do[NFT]' }
// },
// {
// path: '/mint',
// name: 'Minting',
// component: Minting,
// meta: { title: 'Do[NFT]' }
// },
// ])
// }

const router = new Router({
mode: 'history',
base: process.env.BASE_URL,
routes
})

router.afterEach((to, from) => {
// Use next tick to handle router history correctly
// see: https://github.com/vuejs/vue-router/issues/914#issuecomment-384477609
Vue.nextTick(() => {
from
document.title = to.meta.title || process.env.NAME
Expand Down Expand Up @@ -114,7 +79,6 @@ router.beforeEach((to, _from, next) => {
}

// handling transaction hashes, for displayng response to user

const account_id = window.accountId
const url = new URL(document.location)
const tx_hash = url.searchParams.get('transactionHashes')
Expand Down

0 comments on commit cd46bae

Please sign in to comment.