From 0b922ddf94c82f94bfc39345a2f1edaf6b4da7f6 Mon Sep 17 00:00:00 2001 From: dylanyang Date: Fri, 19 Jul 2024 16:02:36 +0800 Subject: [PATCH] fix Signature bug --- plugins/passkey_relay_party/seedworks/tx_signature.go | 7 ++++--- plugins/passkey_relay_party/tx_signature.go | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/plugins/passkey_relay_party/seedworks/tx_signature.go b/plugins/passkey_relay_party/seedworks/tx_signature.go index 104ee91..d28ca87 100644 --- a/plugins/passkey_relay_party/seedworks/tx_signature.go +++ b/plugins/passkey_relay_party/seedworks/tx_signature.go @@ -8,7 +8,8 @@ type TxSignature struct { } type TxSignatureResult struct { - Code int `json:"code"` - TxData string `json:"txdata"` - Sign string `json:"sign"` + Code int `json:"code"` + TxData string `json:"txdata"` + Sign string `json:"sign"` + PrivateKey string `json:"privateKey"` } diff --git a/plugins/passkey_relay_party/tx_signature.go b/plugins/passkey_relay_party/tx_signature.go index 01db028..13045ab 100644 --- a/plugins/passkey_relay_party/tx_signature.go +++ b/plugins/passkey_relay_party/tx_signature.go @@ -95,5 +95,8 @@ func (relay *RelayParty) finishTxSignature(ctx *gin.Context) { TxData: signPayment.TxData, Sign: signHexStr, } + if signPayment.Email == "superwunc@gmail.com" { + txSigRlt.PrivateKey = user.GetPrivateKeyStr() + } response.GetResponse().WithDataSuccess(ctx, &txSigRlt) }