unionlabs/union · error · Error
no `signer` passed
Error message
no `signer` passed
What it means
First guard in aptosSameChainTransfer: the parameters object must include a truthy signer (an AptosAccount for key access or an AptosBrowserWallet for wallet access) before any same-chain fungible transfer can be built. Without a signer there is no one to authorize the 0x1::primary_fungible_store::transfer call.
Source
Thrown at typescript-sdk/src/aptos/transfer.ts:205
})
if (!pendingTransaction.isOk()) {
throw pendingTransaction.error
}
if (!pendingTransaction.value.hash.startsWith("0x")) {
throw new Error("hash not found")
}
return pendingTransaction.value.hash
},
error => new Error(`Transfer failed: ${error}`, { cause: error }),
)
export const aptosSameChainTransfer: (args: AptosTransferBaseParams) => ResultAsync<string, Error> =
ResultAsync.fromThrowable(
async parameters => {
if (!parameters.signer) {
throw new Error("no `signer` passed")
}
if (parameters.authAccess === "wallet") {
const signer = parameters.signer as AptosBrowserWallet
const transaction = await signer.signAndSubmitTransaction({
payload: {
function: "0x1::primary_fungible_store::transfer",
type_arguments: ["0x1::fungible_asset::Metadata"],
arguments: [
//
parameters.denomAddress,
parameters.receiver,
parameters.amount.toString(),
],
},
})
if (!transaction?.success) {View on GitHub (pinned to 031785bb6d)
Solutions
- Pass signer: aptosAccount (key mode) or signer: window.aptos wallet object (wallet mode) in the transfer parameters
- Gate the transfer call on wallet connection / account availability in the UI before invoking
- If migrating from older SDK versions, check whether the field was renamed from account to signer
Example fix
// before
const hash = await transferAsset({ ...params, /* signer missing */ })
// after
const hash = await transferAsset({
...params,
signer: aptosAccount, // or the connected browser wallet
}) Defensive patterns
Strategy: validation
Validate before calling
if (!params.signer) {
throw new Error("Connect an Aptos account or wallet before transferring")
}
const hash = await aptosSameChainTransfer(params).toPromise() Type guard
const hasAptosSigner = (p: AptosTransferBaseParams): p is AptosTransferBaseParams & { signer: AptosAccount | AptosBrowserWallet } =>
Boolean(p.signer) Try / catch
try {
hash = await aptosSameChainTransfer(params).toPromise()
} catch (error) {
if ((error as Error).message === "no `signer` passed") {
// prompt for wallet connection / load account, then retry
}
throw error
} Prevention
- Gate transfer buttons on account/wallet availability in the UI
- Make signer a required field in your own parameter types
- After SDK upgrades, diff parameter field names (account vs signer)
When it happens
Trigger: Invoking the SDK's same-chain Aptos transfer path with signer omitted, null, or undefined — e.g. building parameters from optional state (a wallet that never connected) and skipping a presence check.
Common situations: UI code where the wallet connection is async and transfer is attempted before it resolves; constructing params via spread of an optional object; refactoring that renamed account to signer and dropped it.
Related errors
- Invalid Sui signer: expected Ed25519Keypair
- Invalid Aptos transport
- No Aptos RPC URL found
- waiting for transaction failed
- simulation result not found
AI-assisted analysis of unionlabs/union@031785bb6d (2026-08-16).
Data as JSON: /api/errors/db81ae7577a40520.
Report an issue: GitHub.