Bug fix in routing service
This commit is contained in:
parent
22ff8a7880
commit
0918185ad9
@ -44,12 +44,14 @@ export default class Routing {
|
||||
document.head.appendChild(newScript).parentNode?.removeChild(newScript);
|
||||
}
|
||||
|
||||
public openConfirmationModal(prd?: any, outpointCommitment?: string) {
|
||||
this.currentPrd = prd;
|
||||
const sender = JSON.parse(prd.sender)?.sp_addresses
|
||||
let html = confirmationModalHtml
|
||||
html = html.replace('{{device1}}', sender[0])
|
||||
html = html.replace('{{device2}}', sender[1])
|
||||
public openConfirmationModal(pcd: any, outpointCommitment: string) {
|
||||
let roles = JSON.parse(pcd['roles']);// ['members'][0];
|
||||
console.log(roles);
|
||||
let members = roles['owner']['members'];
|
||||
console.log(members);
|
||||
let html = confirmationModalHtml;
|
||||
html = html.replace('{{device1}}', members[0]['sp_addresses'][0]);
|
||||
html = html.replace('{{device2}}', members[0]['sp_addresses'][1]);
|
||||
this.currentOutpoint = outpointCommitment as string;
|
||||
const container = document.querySelector('.page-container');
|
||||
|
||||
@ -67,7 +69,7 @@ export default class Routing {
|
||||
window.onclick = (event) => {
|
||||
const modal = document.getElementById('modal');
|
||||
if (event.target === modal) {
|
||||
this.confirm(this.currentPrd || prd, outpointCommitment || this.currentOutpoint);
|
||||
this.confirm(this.currentPrd || pcd, outpointCommitment || this.currentOutpoint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user