Skip to content

Commit

Permalink
eosjs 16.0.0 compat fix
Browse files Browse the repository at this point in the history
  • Loading branch information
EOS Rio committed Aug 1, 2018
1 parent 40f55b0 commit 88d2530
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ng-dist/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "simpleos",
"version": "0.6.3",
"version": "0.6.3-2",
"productName": "simpleos",
"description": "EOS Blockchain Interface & Wallet",
"author": {
Expand Down
2 changes: 1 addition & 1 deletion src/app/dashboard/dashboard.component.html
Expand Up @@ -65,7 +65,7 @@
<fa-icon [icon]="['fas', 'heart']"></fa-icon>
by <a style="color: #d7d7d7;" [routerLink]="['about']">EOS Rio</a>
</div>
<div class="version">v0.6.3</div>
<div class="version">v0.6.3-2</div>
</section>
</nav>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/app/dashboard/send/send.component.html
@@ -1,4 +1,4 @@
<toaster-container [toasterconfig]="config"></toaster-container>
<!--<toaster-container [toasterconfig]="config"></toaster-container>-->
<div class="container-fluid" style="overflow:hidden;">
<div class="row flex-items-xs-between send-row">
<div class="col-md-6 text-center animate" style="align-self: center;">
Expand Down
2 changes: 1 addition & 1 deletion src/app/dashboard/vote/vote.component.html
@@ -1,4 +1,4 @@
<toaster-container [toasterconfig]="config"></toaster-container>
<!--<toaster-container [toasterconfig]="config"></toaster-container>-->
<div class="container" style="height: 100%; overflow-x: hidden;">
<div class="row animate" style="padding-top: 15px;">
<div class="col-lg-6">
Expand Down
1 change: 1 addition & 0 deletions src/app/dashboard/vote/vote.component.ts
Expand Up @@ -205,6 +205,7 @@ export class VoteComponent implements OnInit, AfterViewInit {
this.busy = true;
const account = this.aService.selected.getValue();
const pubkey = account.details['permissions'][0]['required_auth'].keys[0].key;
console.log(pubkey);
this.crypto.authenticate(password, pubkey).then((data) => {
if (data === true) {
let call;
Expand Down
4 changes: 3 additions & 1 deletion src/app/eosjs.service.ts
Expand Up @@ -45,7 +45,9 @@ export class EOSJSService {
reloadInstance() {
this.auth = true;
this.eos = EOSJS(this.baseConfig);
this.baseConfig.keyProvider = [];
setTimeout(() => {
this.baseConfig.keyProvider = [];
}, 1000);
}

clearInstance() {
Expand Down
3 changes: 2 additions & 1 deletion src/app/services/crypto.service.ts
Expand Up @@ -151,7 +151,8 @@ export class CryptoService {
name: 'AES-GCM',
iv: iv
}, this.masterKey, data);
this.eosjs.baseConfig.keyProvider.push(String.fromCharCode.apply(null, new Uint8Array(decrypted)).replace(/"/g, ''));
const decryptedKey = String.fromCharCode.apply(null, new Uint8Array(decrypted));
this.eosjs.baseConfig.keyProvider = decryptedKey.replace(/^"(.+(?="$))"$/, '$1');
this.eosjs.reloadInstance();
return true;
} else {
Expand Down

0 comments on commit 88d2530

Please sign in to comment.