File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
we-contract-sdk-core/src/main/kotlin/com/wavesenterprise/sdk/contract/core/state Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ mockkVersion=1.12.3
35
35
springMockkVersion =3.1.1
36
36
37
37
# WE SDK
38
- weNodeClientVersion =1.1.0
38
+ weNodeClientVersion =1.3.1
39
39
40
40
# GitHub properties
41
41
gitHubProject = "waves-enterprise/we-contract-sdk"
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import com.wavesenterprise.sdk.contract.core.state.mapping.ReadMappingForType
13
13
import com.wavesenterprise.sdk.contract.core.state.mapping.ReadMappingForTypeReference
14
14
import com.wavesenterprise.sdk.node.domain.DataEntry
15
15
import com.wavesenterprise.sdk.node.domain.contract.ContractId
16
+ import com.wavesenterprise.sdk.node.exception.specific.DataKeyNotExistException
16
17
import java.util.Optional
17
18
18
19
class ContractStateReaderIml (
@@ -90,7 +91,11 @@ class ContractStateReaderIml(
90
91
}
91
92
92
93
private fun getKeyValue (key : String ): DataEntry ? =
93
- backingMap[key] ? : nodeContractStateValuesProvider.getForKeyAsNullable(contractId, key)?.also { backingMap[key] = it }
94
+ try {
95
+ backingMap[key] ? : nodeContractStateValuesProvider.getForKeyAsNullable(contractId, key)?.also { backingMap[key] = it }
96
+ } catch (ex: DataKeyNotExistException ) {
97
+ null
98
+ }
94
99
95
100
private fun <T > getNullableValue (key : String , valueType : Class <T >): T ? =
96
101
getKeyValue(key)?.run {
You can’t perform that action at this time.
0 commit comments