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);
|
document.head.appendChild(newScript).parentNode?.removeChild(newScript);
|
||||||
}
|
}
|
||||||
|
|
||||||
public openConfirmationModal(prd?: any, outpointCommitment?: string) {
|
public openConfirmationModal(pcd: any, outpointCommitment: string) {
|
||||||
this.currentPrd = prd;
|
let roles = JSON.parse(pcd['roles']);// ['members'][0];
|
||||||
const sender = JSON.parse(prd.sender)?.sp_addresses
|
console.log(roles);
|
||||||
let html = confirmationModalHtml
|
let members = roles['owner']['members'];
|
||||||
html = html.replace('{{device1}}', sender[0])
|
console.log(members);
|
||||||
html = html.replace('{{device2}}', sender[1])
|
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;
|
this.currentOutpoint = outpointCommitment as string;
|
||||||
const container = document.querySelector('.page-container');
|
const container = document.querySelector('.page-container');
|
||||||
|
|
||||||
@ -67,7 +69,7 @@ export default class Routing {
|
|||||||
window.onclick = (event) => {
|
window.onclick = (event) => {
|
||||||
const modal = document.getElementById('modal');
|
const modal = document.getElementById('modal');
|
||||||
if (event.target === 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