fix(BC): Fixing the send transaction

The send transaction was successful, but the transaction hash is not recognized by the dApp because it was being hashed again.
This commit is contained in:
Alex Jbanca 2024-11-19 09:42:55 +02:00
parent f42f342731
commit cae8337f93
No known key found for this signature in database
GPG Key ID: 6004079575C21C5D
1 changed files with 1 additions and 5 deletions

View File

@ -7,8 +7,6 @@ import app/core/signals/types
import app_service/service/connector/service as connector_service import app_service/service/connector/service as connector_service
import app_service/common/utils
const SIGNAL_CONNECTOR_SEND_REQUEST_ACCOUNTS* = "ConnectorSendRequestAccounts" const SIGNAL_CONNECTOR_SEND_REQUEST_ACCOUNTS* = "ConnectorSendRequestAccounts"
const SIGNAL_CONNECTOR_EVENT_CONNECTOR_SEND_TRANSACTION* = "ConnectorSendTransaction" const SIGNAL_CONNECTOR_EVENT_CONNECTOR_SEND_TRANSACTION* = "ConnectorSendTransaction"
const SIGNAL_CONNECTOR_GRANT_DAPP_PERMISSION* = "ConnectorGrantDAppPermission" const SIGNAL_CONNECTOR_GRANT_DAPP_PERMISSION* = "ConnectorGrantDAppPermission"
@ -115,9 +113,7 @@ QtObject:
self.rejectConnectResponse(requestId, not result) self.rejectConnectResponse(requestId, not result)
proc approveTransaction*(self: Controller, sessionTopic: string, requestId: string, signature: string): bool {.slot.} = proc approveTransaction*(self: Controller, sessionTopic: string, requestId: string, signature: string): bool {.slot.} =
let hash = utils.createHash(signature) result = self.service.approveTransactionRequest(requestId, signature)
result = self.service.approveTransactionRequest(requestId, hash)
self.approveTransactionResponse(sessionTopic, requestId, not result) self.approveTransactionResponse(sessionTopic, requestId, not result)
proc rejectTransaction*(self: Controller, sessionTopic: string, requestId: string): bool {.slot.} = proc rejectTransaction*(self: Controller, sessionTopic: string, requestId: string): bool {.slot.} =