File tree 2 files changed +13
-1
lines changed
2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,8 @@ app.*.symbols
41
41
# Obfuscation related
42
42
app. * .map.json
43
43
44
+ /lib /secrets.dart
45
+
44
46
# Android Studio will place build artifacts here
45
47
/android /app /debug
46
48
/android /app /profile
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import 'package:web_socket_channel/io.dart';
7
7
import 'package:http/http.dart' as http;
8
8
9
9
import '../config.dart' ;
10
+ import '../secrets.dart' ;
10
11
11
12
class UserContractService {
12
13
@@ -20,6 +21,10 @@ class UserContractService{
20
21
}) async {
21
22
// return the address of deployed contract
22
23
final response = await http.post (Uri .parse ("${Config .backendUrl }/contract" ),
24
+ headers: {
25
+ "apiKey" : APIKEY ,
26
+ "Content-Type" : "application/json"
27
+ },
23
28
body: {
24
29
"name" : name,
25
30
"email" : email,
@@ -42,7 +47,12 @@ class UserContractService{
42
47
43
48
Future <Object > getAbi () async {
44
49
// get the abi from calling the application backend
45
- final response = await http.get (Uri .parse ("${Config .backendUrl }/contract" ));
50
+ final response = await http.get (
51
+ Uri .parse ("${Config .backendUrl }/contract" ),
52
+ headers: {
53
+ "apiKey" : APIKEY
54
+ }
55
+ );
46
56
if (response.statusCode == 200 ){
47
57
var responseJson = jsonDecode (response.body);
48
58
return responseJson['data' ];
You can’t perform that action at this time.
0 commit comments