From 416a786e73ada7797b4add56c286a02956c7af2c Mon Sep 17 00:00:00 2001 From: BTChip github Date: Fri, 8 Mar 2019 17:34:16 +0100 Subject: [PATCH] Review external token reset policy take 2 --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index aa87fec..5beaaec 100644 --- a/src/main.c +++ b/src/main.c @@ -1556,7 +1556,7 @@ tokenDefinition_t* getKnownToken() { } #endif - if (currentTokenSet && (os_memcmp(tmpCtx.transactionContext.currentToken.address, tmpContent.txContent.destination, 20) == 0)) { + if ((currentTokenSet || tokenProvisioned) && (os_memcmp(tmpCtx.transactionContext.currentToken.address, tmpContent.txContent.destination, 20) == 0)) { currentTokenSet = false; return &tmpCtx.transactionContext.currentToken; }