|
|
@@ -94,8 +94,8 @@ public class VaultodyServiceImpl implements VaultodyService {
|
|
|
" \"passphrase\": \"7UGMi2*t0h\",\n" +
|
|
|
" \"vaultId\": \"\",\n" +
|
|
|
" \"baseUrl\": \"https://rest.vaultody.com\",\n" +
|
|
|
- " \"vaultsListUrl\": \"/vaults/test\",\n" +
|
|
|
- " \"network\": \"\",\n" +
|
|
|
+ " \"vaultsListUrl\": \"/vaults/%s\",\n" +
|
|
|
+ " \"networkType\": \"test\",\n" +
|
|
|
" \"vaultsTransactionsPathTemplate\": \"/vaults/%s/transactions\",\n" +
|
|
|
" \"webhooksPassphrase\": \"\",\n" +
|
|
|
" \"vaultodyList\": [\n" +
|
|
|
@@ -105,8 +105,8 @@ public class VaultodyServiceImpl implements VaultodyService {
|
|
|
" \"passphrase\": \"7UGMi2*t0h\",\n" +
|
|
|
" \"vaultId\": \"69cb34038d64830006453c0c\",\n" +
|
|
|
" \"baseUrl\": \"https://rest.vaultody.com\",\n" +
|
|
|
- " \"vaultsListUrl\": \"/vaults/test\",\n" +
|
|
|
- " \"network\": \"\",\n" +
|
|
|
+ " \"vaultsListUrl\": \"/vaults/%s\",\n" +
|
|
|
+ " \"networkType\": \"test\",\n" +
|
|
|
" \"vaultsTransactionsPathTemplate\": \"/vaults/%s/transactions\",\n" +
|
|
|
" \"webhooksPassphrase\": \"\"\n" +
|
|
|
" },\n" +
|
|
|
@@ -116,8 +116,8 @@ public class VaultodyServiceImpl implements VaultodyService {
|
|
|
" \"passphrase\": \"7UGMi2*t0h\",\n" +
|
|
|
" \"vaultId\": \"002\",\n" +
|
|
|
" \"baseUrl\": \"https://rest.vaultody.com\",\n" +
|
|
|
- " \"vaultsListUrl\": \"/vaults/test\",\n" +
|
|
|
- " \"network\": \"\",\n" +
|
|
|
+ " \"vaultsListUrl\": \"/vaults/%s\",\n" +
|
|
|
+ " \"networkType\": \"test\",\n" +
|
|
|
" \"vaultsTransactionsPathTemplate\": \"/vaults/%s/transactions\",\n" +
|
|
|
" \"webhooksPassphrase\": \"\"\n" +
|
|
|
" }\n" +
|
|
|
@@ -189,6 +189,14 @@ public class VaultodyServiceImpl implements VaultodyService {
|
|
|
String actualPath = String.format(pathTemplate, vaultId);
|
|
|
return actualPath;
|
|
|
}
|
|
|
+ /**
|
|
|
+ * 交易记录接口拼接url
|
|
|
+ */
|
|
|
+ public String getVaultsPath(String pathTemplate, String networkType) {
|
|
|
+// String pathTemplate = "/vaults/{networkType}";
|
|
|
+ String actualPath = String.format(pathTemplate, networkType);
|
|
|
+ return actualPath;
|
|
|
+ }
|
|
|
|
|
|
public VaultodyConfig getVaultodyConfig() {
|
|
|
SysVaultodyConfigTable configTable = vaultodyConfigService.getByCode(ConfigConstants.VAULTODY_MANAGER_CONFIG);
|
|
|
@@ -243,7 +251,7 @@ public class VaultodyServiceImpl implements VaultodyService {
|
|
|
String apiSecret = config.getApiSecret();
|
|
|
String passphrase = config.getPassphrase();
|
|
|
String method = "GET";
|
|
|
- String requestPath = config.getVaultsListUrl();
|
|
|
+ String requestPath = getVaultsPath(config.getVaultsListUrl(), config.getNetworkType());
|
|
|
String baseUrl = config.getBaseUrl();
|
|
|
|
|
|
String query = "{}"; // POST 时 query 通常为空,否则按接口要求填写
|