Skip to content

Commit

Permalink
quick fix balanceTransfer
Browse files Browse the repository at this point in the history
TODO: move transaction details to model (TransactionBuilder)
  • Loading branch information
kewde committed Sep 30, 2017
1 parent e378b2d commit 524725a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions src/app/wallet/send/send.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,13 @@ export class SendComponent {

/** checkAddres: returns boolean, so it can be private later. */
checkAddress(): boolean {
return this.send.validAddress;
// use default transferBalance address.
if(this.type === 'balanceTransfer' && !this.send.toAddress) {
return true;
// custom address
} else {
return this.send.validAddress;
}
}

/** verifyAddress: calls RPC to validate it. */
Expand All @@ -137,13 +143,12 @@ export class SendComponent {
}
}

// this._rpc.oldCall(this, 'validateaddress', [this.send.toAddress], validateAddressCB);
this._rpc.call('validateaddress', [this.send.toAddress])
.subscribe(response => {
validateAddressCB(response)
},
error => {
this.log.er('errr');
this.log.er('verifyAddress: validateAddressCB failed');
});
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/wallet/send/send.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class SendService {
this.rpc_setDefaultAddress_success(response)
},
error => {
this.log.er('errr');
this.log.er('rpc_listDefaultAddress_success: liststealthaddresses failed');
});
}
}
Expand Down

0 comments on commit 524725a

Please sign in to comment.