Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Wallet
sentinel-android
Commits
82e1fbbc
Verified
Commit
82e1fbbc
authored
Apr 11, 2021
by
Sarath
⚔
Browse files
API refactor
parent
0f9a4fd5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
app/src/main/java/com/samourai/sentinel/api/APIFactory.java
app/src/main/java/com/samourai/sentinel/api/APIFactory.java
+11
-7
No files found.
app/src/main/java/com/samourai/sentinel/api/APIFactory.java
View file @
82e1fbbc
...
...
@@ -97,12 +97,12 @@ public class APIFactory {
for
(
int
i
=
0
;
i
<
xpubs
.
length
;
i
++)
{
try
{
StringBuilder
url
=
new
String
Builder
(
_url
);
url
.
append
(
"multiaddr?active="
);
url
.
append
(
xpubs
[
i
]);
url
.
append
(
"&&at="
.
concat
(
getAccessToken
())
);
FormBody
body
=
new
FormBody
.
Builder
(
)
.
add
(
"active"
,
xpubs
[
i
])
.
add
(
"at"
,
getAccessToken
())
.
build
(
);
// Log.i("APIFactory", "XPUB:" + url.toString());
String
response
=
WebUtil
.
getInstance
(
context
).
ge
tURL
(
url
.
toString
()
);
String
response
=
WebUtil
.
getInstance
(
context
).
pos
tURL
(
_
url
.
concat
(
"multiaddr"
),
body
);
Log
.
i
(
"APIFactory"
,
"XPUB response:"
+
response
);
try
{
jsonObject
=
new
JSONObject
(
response
);
...
...
@@ -543,9 +543,13 @@ public class APIFactory {
try
{
String
url
=
WebUtil
.
getAPIUrl
(
context
).
concat
(
"fees"
);
url
=
url
.
concat
(
"?at="
.
concat
(
getAccessToken
()));
FormBody
body
=
new
FormBody
.
Builder
()
.
add
(
"at"
,
getAccessToken
())
.
build
();
// Log.i("APIFactory", "Dynamic fees:" + url.toString());
String
response
=
WebUtil
.
getInstance
(
context
).
ge
tURL
(
url
);
String
response
=
WebUtil
.
getInstance
(
context
).
pos
tURL
(
url
,
body
);
// Log.i("APIFactory", "Dynamic fees response:" + response);
try
{
jsonObject
=
new
JSONObject
(
response
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment