XRPL-Labs / Xaman-App

Xaman (Formerly XUMM) for iOS and Android (React Native)
https://support.xumm.app
Other
104 stars 48 forks source link

Feature: Multisign SignAs where user has set RegularKey #110

Open dangell7 opened 6 months ago

dangell7 commented 6 months ago

In order to perform multisign where one of the signers has a RegularKey enabled you must signAs using the account while signing the transaction with the delegate.

const signer1 = derive.familySeed('') -> This user has set their `RegularKey` to signer1Delegate
const signer1Delegate = derive.familySeed('')
const regKeySig1 = sign(
    accountSetTx,
    signer1Delegate.signAs(signer1.address as string)
  )

The fix might occur here:

https://github.com/XRPL-Labs/Xaman-App/blob/e6b13d877f4b7178ac51b51d345edc9fee81ee8c/src/screens/Overlay/Vault/VaultModal.tsx#L293

This account needs to be the signer1 address.