@@ -14,6 +14,7 @@ import org.springframework.http.ResponseEntity
1414import org.springframework.web.client.RestTemplate
1515import java.math.BigDecimal
1616import java.time.LocalDateTime
17+ import java.util.*
1718
1819class DefaultStateApiTests : UnitTest () {
1920
@@ -29,27 +30,16 @@ class DefaultStateApiTests : UnitTest() {
2930
3031 @Test
3132 fun createWalletTest () {
32- val request = CreateStateWalletRequestMetadata (
33+ val request = CreateStateWalletRequest (
34+ " address" ,
3335 " webhook" ,
34- " applicationId" ,
35- listOf (KeyWalletDto (" address" , Blockchain .Ethereum .getValue(), " CUSTODIAL" )),
36- WalletMetaData (
37- " 0" ,
38- " op_UxQr1LLdREboF" ,
39- " USD" ,
40- " open" ,
41- false ,
42- false
43- )
44- )
45- val response = CreateStateWalletResponse (
46- " webhook" ,
47- " op_UxQr1LLdREboF" ,
48- BigDecimal .ZERO ,
49- listOf (WalletCreateResponse (Blockchain .Ethereum .getValue()," address" , BigDecimal .ZERO ))
36+ Blockchain .Ethereum .getValue(),
37+ " applicationId"
5038 )
39+ val response = StateWalletDto (
40+ UUID .randomUUID().toString(), " address" , " webhook" , Blockchain .Ethereum , LocalDateTime .now())
5141
52- given(restTemplate.postForEntity(" /wallets" , request, CreateStateWalletResponse ::class .java)).willReturn(ResponseEntity (response, HttpStatus .OK ))
42+ given(restTemplate.postForEntity(" /wallets/single " , request, StateWalletDto ::class .java)).willReturn(ResponseEntity (response, HttpStatus .OK ))
5343
5444 val result = stateApi.createWallet(" address" , " webhook" , Blockchain .Ethereum , " applicationId" )
5545
0 commit comments