Skip to content

Commit

Permalink
fix: setting callback value on transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
dafuga committed Dec 24, 2024
1 parent 50b6d1a commit f6115ca
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {
createIdentityRequest,
extractSignaturesFromCallback,
isCallback,
setTransactionCallback,
} from '@wharfkit/protocol-esr'
import {
AbstractWalletPlugin,
Expand Down Expand Up @@ -132,8 +133,11 @@ export class WalletPluginWebAuthenticator extends AbstractWalletPlugin implement
context: TransactContext
): Promise<WalletPluginSignResponse> {
try {
// Create a new signing request based on the existing resolved request
const modifiedRequest = await context.createRequest({transaction: resolved.transaction})
setTransactionCallback(modifiedRequest, '')
const signUrl = `${this.webAuthenticatorUrl}/sign?esr=${encodeURIComponent(
resolved.request.encode()
modifiedRequest.encode()
)}&chain=${context.chain?.name}&accountName=${context.accountName}&permissionName=${
context.permissionName
}`
Expand Down

0 comments on commit f6115ca

Please sign in to comment.