Skip to content
This repository has been archived by the owner on Jul 9, 2023. It is now read-only.

Commit

Permalink
sia v1.5.5 update
Browse files Browse the repository at this point in the history
  • Loading branch information
n8maninger committed Feb 19, 2021
1 parent 243263f commit a75678d
Show file tree
Hide file tree
Showing 8 changed files with 109 additions and 191 deletions.
1 change: 0 additions & 1 deletion .env

This file was deleted.

14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
## February 2021

### v1.0.31

### Changes

+ Update to Sia v1.5.5

### Bug Fixes

+ Fixed issue with display currency being overridden to USD

## January 2021

### v1.0.30

### Changes

+ Update to Sia v1.5.4
Expand Down
176 changes: 87 additions & 89 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Sia-Host-Manager",
"version": "1.0.30",
"version": "1.0.31",
"private": true,
"description": "User-friendly management utility for Sia storage network hosts. Provides easy configuration, better financials, and smart alerts to make hosting simpler.",
"author": {
Expand Down
14 changes: 4 additions & 10 deletions src/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,10 @@ export function getUserDataPath(subdir) {
export async function readSiaUIConfig() {
const siaUIDataPath = path.join(getUserDataPath('Sia-UI'), 'sia');
let config = {
'dark_mode': true // config.darkMode
'dark_mode': true,
'siad_data_path': siaUIDataPath
};

try {
const consensusFolder = await fs.stat(path.join(siaUIDataPath, 'consensus'));

if (consensusFolder && consensusFolder.isDirectory())
config.siad_data_path = siaUIDataPath;
} catch (ex) {
console.log('unable to stat sia data folder', ex);
}

try {
const { siad } = JSON.parse(decode(await fs.readFile(path.join(siaUIDataPath, 'config.json'))));

Expand All @@ -40,6 +32,8 @@ export async function readSiaUIConfig() {
console.log('unable to decode Sia-UI config json', ex);
}

console.log(config);

return config;
}

Expand Down
43 changes: 0 additions & 43 deletions src/views/pages/Wallet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,13 @@
<input type="text" class="receive-address" :value="address" readonly />
</div>
<button class="btn btn-inline" @click="onCopyAddress"><icon icon="copy" /></button>
<div class="buy-button">
<button class="btn btn-inline" @click="onBuySiacoin">Buy Siacoin (PREVIEW)</button>
</div>
</div>
</template>

<script>
import log from 'electron-log';
import { mapState, mapActions } from 'vuex';
import { clipboard } from 'electron';
import Transak from '@transak/transak-sdk';
import AddressQRCode from '@/components/wallet/AddressQRCode';
Expand All @@ -43,45 +39,6 @@ export default {
} catch (ex) {
log.error('receive siacoin copy', ex.message);
}
},
async onBuySiacoin() {
try {
const transak = new Transak({
apiKey: process.env.VUE_APP_TRANSAK_KEY,
environment: 'PRODUCTION',
cryptoCurrencyCode: 'SC',
walletAddress: this.address,
themeColor: '19cf86',
countryCode: 'US',
widgetHeight: `${window.innerHeight * 0.8}px`,
hostURL: window.location.origin
});
transak.init();
// To get all the events
transak.on(transak.ALL_EVENTS, (data) => {
console.log(data);
});
// This will trigger when the user marks payment is made.
transak.on(transak.EVENTS.TRANSAK_ORDER_SUCCESSFUL, (orderData) => {
console.log(orderData);
transak.close();
});
// This will trigger when the user closes the widget
transak.on(transak.EVENTS.TRANSAK_WIDGET_CLOSE, () => {
// transak widget annoyingly sets overflow to 'scroll' reset it back to auto
document.querySelector('html').style.overflow = 'auto';
});
} catch (ex) {
console.error('ReceiveModal.onBuySiacoin', ex);
this.pushNotification({
severity: 'danger',
message: ex.message
});
}
}
}
};
Expand Down
7 changes: 3 additions & 4 deletions src/views/setup/ImportStep.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
<div class="setup-icon">
<SiaCentralSia />
</div>
<h3>Would you like to import your configuration?</h3>
<p>It looks like you already have Sia-UI. Would you like to import your configuration?
This will save you a little time with the initial setup.</p>
<h3>Would you like to link Host Manager to Sia-UI?</h3>
<p>This ensures that Sia-UI and Host Manager will share the same Sia wallet.</p>
</template>

<template v-slot:controls>
<button class="btn btn-inline" @click="onNext(false)">No Thanks</button>
<button class="btn btn-success btn-inline" @click="onNext(true)">Import</button>
<button class="btn btn-success btn-inline" @click="onNext(true)">Link</button>
</template>
</setup-step>
</template>
Expand Down
Loading

0 comments on commit a75678d

Please sign in to comment.