Developer Questions
Problem of sign in payload
over 1 year ago by Owen
hey team we are trying to integrate XUMM for our website in web browser. we need to sign a customised hash in order to go through. however the following code does not wake up any QR code process. Can you help give some idea?
Thanks
const subscription = await this.xumm.payload.createAndSubscribe({
custom_meta: {
instruction: hash.hash,
},
txjson: {
TransactionType: "SignIn",
}
}, event => {
console.log('New payload event:', event.data)
if (event.data.signed === true) {
console.log(event.data.payload_uuidv4)
console.log('Woohoo! The sign request was signed :)')
this.doLogin(event.data.payload_uuidv4, userAccount,hash)
return event.data
}
if (event.data.signed === false) {
console.log('The sign request was rejected :(')
this.closeHandle()
return false
}
})