diff --git a/http_server/handle/approval_delay.go b/http_server/handle/approval_delay.go index 2c975e0f..350f940e 100644 --- a/http_server/handle/approval_delay.go +++ b/http_server/handle/approval_delay.go @@ -184,6 +184,8 @@ func (h *HttpHandle) doApprovalDelayMainAccount(req *ReqApprovalDelay, apiResp * action: common.DasActionDelayApproval, account: req.Account, evmChainId: req.EvmChainId, + address: accInfo.Owner, + chainType: accInfo.OwnerChainType, }) if err != nil { apiResp.ApiRespErr(api_code.ApiCodeError500, "buildTx err: "+err.Error()) diff --git a/http_server/handle/approval_enable.go b/http_server/handle/approval_enable.go index 73ab847e..865d9836 100644 --- a/http_server/handle/approval_enable.go +++ b/http_server/handle/approval_enable.go @@ -199,6 +199,8 @@ func (h *HttpHandle) doApprovalEnableMainAccount(req *ReqApprovalEnable, apiResp action: common.DasActionCreateApproval, account: req.Account, evmChainId: req.EvmChainId, + address: accInfo.Owner, + chainType: accInfo.OwnerChainType, }) if err != nil { apiResp.ApiRespErr(api_code.ApiCodeError500, "buildTx err: "+err.Error()) diff --git a/http_server/handle/approval_fulfill.go b/http_server/handle/approval_fulfill.go index fe8cc041..0d809cf3 100644 --- a/http_server/handle/approval_fulfill.go +++ b/http_server/handle/approval_fulfill.go @@ -154,9 +154,11 @@ func (h *HttpHandle) doApprovalFulfillMainAccount(req *ReqApprovalFulfill, apiRe txParams.OutputsData = append(txParams.OutputsData, accData) signList, txHash, err := h.buildTx(¶mBuildTx{ - txParams: &txParams, - action: common.DasActionFulfillApproval, - account: req.Account, + txParams: &txParams, + action: common.DasActionFulfillApproval, + account: req.Account, + address: accInfo.Owner, + chainType: accInfo.OwnerChainType, }) if err != nil { apiResp.ApiRespErr(api_code.ApiCodeError500, "buildTx err: "+err.Error()) diff --git a/http_server/handle/approval_revoke.go b/http_server/handle/approval_revoke.go index 7dc8cf18..bea7c970 100644 --- a/http_server/handle/approval_revoke.go +++ b/http_server/handle/approval_revoke.go @@ -162,10 +162,17 @@ func (h *HttpHandle) doApprovalRevokeMainAccount(req *ReqApprovalRevoke, apiResp }) txParams.OutputsData = append(txParams.OutputsData, accData) + platformHex, err := req.FormatChainTypeAddress(config.Cfg.Server.Net, false) + if err != nil { + apiResp.ApiRespErr(api_code.ApiCodeParamsInvalid, "params invalid") + return err + } signList, txHash, err := h.buildTx(¶mBuildTx{ - txParams: &txParams, - action: common.DasActionRevokeApproval, - account: req.Account, + txParams: &txParams, + action: common.DasActionRevokeApproval, + account: req.Account, + address: platformHex.AddressHex, + chainType: platformHex.ChainType, }) if err != nil { apiResp.ApiRespErr(api_code.ApiCodeError500, "buildTx err: "+err.Error()) diff --git a/http_server/handle/transaction_send_new.go b/http_server/handle/transaction_send_new.go index 36156a79..ef08046f 100644 --- a/http_server/handle/transaction_send_new.go +++ b/http_server/handle/transaction_send_new.go @@ -529,9 +529,17 @@ func (h *HttpHandle) doEditSignMsg(req *ReqTransactionSend, apiResp *api_code.Ap return nil } + if req.SignAddress == "" { + err := fmt.Errorf("sign_address can not be empty when has webauthn sign (sign_type = 8)") + apiResp.ApiRespErr(api_code.ApiCodeParamsInvalid, err.Error()) + return err + } + txAddr := "" switch req.Action { - case common.DasActionEnableSubAccount, common.DasActionConfigSubAccountCustomScript, common.DasActionConfigSubAccount: + case common.DasActionEnableSubAccount, common.DasActionConfigSubAccountCustomScript, common.DasActionConfigSubAccount, + common.DasActionCreateApproval, common.DasActionDelayApproval, + common.DasActionRevokeApproval, common.DasActionFulfillApproval: var sic SignInfoCache txStr, err := h.RC.GetSignTxCache(req.SignKey) if err != nil {