capi
capi copied to clipboard
rethinking senderProxyId
In VirtualMultisigRune there is a senderProxyId method with the following code snippet
senderProxyId<X>(...[senderAccountId]: RunicArgs<X, [senderAccountId: Uint8Array]>) {
const senderAccountIdHex = Rune.resolve(senderAccountId).map(hex.encode)
const senderProxyI = this.proxies.access(senderAccountIdHex)
const senderProxyAccountId = this.inner
.into(ValueRune)
.access("signatories")
.access(senderProxyI)
return MultiAddress.Id(senderProxyAccountId)
}
In the event that there is no sender proxy id it returns { type: 'Id', value: undefined }. Would it be better to just return undefined if the inner value is undefined? This is also good because they can just do unhandle(undefined)