Skip to content
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@emotion/react": "^11.8.2",
"@emotion/styled": "^11.8.1",
"@fontsource/roboto": "^4.5.8",
"@liftedinit/many-js": "^0.1.0-alpha.8",
"@liftedinit/many-js": "^0.1.0-alpha.9",
"@liftedinit/ui": "github:liftedinit/lifted-ui",
"@web3auth/openlogin-adapter": "^2.1.3",
"@web3auth/web3auth": "^2.1.3",
Expand Down
4 changes: 2 additions & 2 deletions src/features/accounts/api/multisig-submit.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { useMutation } from "react-query"
import { useNetworkContext } from "features/network"
import { EventType } from "@liftedinit/many-js"
import { EventType, Memo } from "@liftedinit/many-js"

type SubmitData = {
from: string
to: string
amount: bigint
symbol: string
memo?: string
memo?: Memo
threshold?: number
executeAutomatically?: boolean
expireInSecs?: number
Expand Down
32 changes: 17 additions & 15 deletions src/features/transactions/components/send-asset/send-asset.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -207,22 +207,24 @@ export function useSendAssetForm({
multisigSettings as Map<string, unknown>,
formValues.multisigSettings,
)
doCreateMultisigSubmitTxn(
{
from: address,
to: formValues.to,
amount: bigIntAmount,
symbol: asset!.identity,
memo: formValues?.memo?.trim(),
...newMultisigSettings,
},
{
onSuccess: () => {
onSendSuccess()
onSuccess?.()
},
const txn = {
from: address,
to: formValues.to,
amount: bigIntAmount,
symbol: asset!.identity,
...newMultisigSettings,
}
if (formValues.memo) {
//@ts-ignore
txn.memo = [formValues.memo.trim()]
}

doCreateMultisigSubmitTxn(txn, {
onSuccess: () => {
onSendSuccess()
onSuccess?.()
},
)
})
return
}
doCreateSendTxn(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@ export function SubmittedMultisigTxnDetails({
const { memo, executeAutomatically, threshold, transaction, submitter } =
(multisigTxnInfoData?.info ?? {}) as MultisigTransactionInfo

const memoStr = memo && typeof memo[0] === "string" ? memo[0] : ""
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could also do a map here. Depends on how many human-readable memos we expect transactions to have.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just the 1 from the UI for now so I think that's fine.


const submitterContactName = getContactName(submitter)

const approvers = makeApproversMap(
Expand Down Expand Up @@ -271,7 +273,7 @@ export function SubmittedMultisigTxnDetails({

<DataField label="Required Approvers" value={threshold} />

<DataField label="Memo" value={memo} />
<DataField label="Memo" value={memoStr} />

<DataField
label="Execute Automatically"
Expand Down