File tree 11 files changed +27
-27
lines changed
11 files changed +27
-27
lines changed Original file line number Diff line number Diff line change 22
22
23
23
# # payment configuration
24
24
PAYMENT_ENABLED = True
25
- PAYMENT_PATH = ./payment_config.json
25
+ PAYMENT_CONFIG_PATH = ./payment_config.json
26
26
PAYMENT_CONTRACT_URL = http://127.0.0.1:8545
27
27
PAYMENT_CONTRACT_ADDRESS = 0x5fbdb2315678afecb367f032d93f642f64180aa3
28
- PAYMENT_ADDRESS = EN9YK69ScA6WFgVQW3UZcmSRLSCStaU2pQ
28
+ PAYMENT_RECEIVING_ADDRESS = EN9YK69ScA6WFgVQW3UZcmSRLSCStaU2pQ
29
29
30
30
# # using atlast service or mongodb service
31
31
ATLAS_ENABLED = False
Original file line number Diff line number Diff line change 22
22
23
23
# # payment configuration
24
24
# PAYMENT_ENABLED = True
25
- # PAYMENT_PATH = ./payment_config.json
25
+ # PAYMENT_CONFIG_PATH = ./payment_config.json
26
26
# PAYMENT_CONTRACT_URL = "xxx"
27
27
# PAYMENT_CONTRACT_ADDRESS = "xxx"
28
- # PAYMENT_ADDRESS =
28
+ # PAYMENT_RECEIVING_ADDRESS =
29
29
30
30
# # using atlast service or mongodb service
31
31
ATLAS_ENABLED = False
File renamed without changes.
Original file line number Diff line number Diff line change @@ -21,10 +21,10 @@ SENTRY_ENABLED = False
21
21
22
22
## payment configuration
23
23
PAYMENT_ENABLED = True
24
- PAYMENT_PATH = ./payment_config.json
24
+ PAYMENT_CONFIG_PATH = ./payment_config.json
25
25
PAYMENT_CONTRACT_URL = http://127.0.0.1:8545
26
26
PAYMENT_CONTRACT_ADDRESS = 0x5fbdb2315678afecb367f032d93f642f64180aa3
27
- PAYMENT_ADDRESS = EN9YK69ScA6WFgVQW3UZcmSRLSCStaU2pQ
27
+ PAYMENT_RECEIVING_ADDRESS = EN9YK69ScA6WFgVQW3UZcmSRLSCStaU2pQ
28
28
29
29
## using atlast service or mongodb service
30
30
ATLAS_ENABLED = False
Original file line number Diff line number Diff line change @@ -72,15 +72,15 @@ def DID_DATA_CACHE_PATH(self):
72
72
return self .DID_DATA_BASE_DIR + '/cache'
73
73
74
74
@property
75
- def PAYMENT_PATH (self ):
76
- path = self .env_config ('PAYMENT_PATH ' , default = './payment_config.json' , cast = str )
75
+ def PAYMENT_CONFIG_PATH (self ):
76
+ path = self .env_config ('PAYMENT_CONFIG_PATH ' , default = './payment_config.json' , cast = str )
77
77
if path .startswith ('/' ):
78
78
return path
79
79
return os .path .join (BASE_DIR , path )
80
80
81
81
@property
82
- def PAYMENT_ADDRESS (self ):
83
- return self .env_config ('PAYMENT_ADDRESS ' , default = 'EN9YK69ScA6WFgVQW3UZcmSRLSCStaU2pQ' , cast = str )
82
+ def PAYMENT_RECEIVING_ADDRESS (self ):
83
+ return self .env_config ('PAYMENT_RECEIVING_ADDRESS ' , default = 'EN9YK69ScA6WFgVQW3UZcmSRLSCStaU2pQ' , cast = str )
84
84
85
85
@property
86
86
def MONGODB_URI (self ):
Original file line number Diff line number Diff line change @@ -14,16 +14,16 @@ class PaymentConfig:
14
14
15
15
@staticmethod
16
16
def init_config ():
17
- path = os .path .join (SRC_DIR , hive_setting .PAYMENT_PATH )
17
+ path = os .path .join (SRC_DIR , hive_setting .PAYMENT_CONFIG_PATH )
18
18
config_file = Path (path )
19
19
if not config_file .exists ():
20
20
logging .getLogger ('v1 PaymentConfig' ).info ("hive_setting.HIVE_PAYMENT_CONFIG dose not exist" )
21
21
else :
22
- logging .getLogger ('v1 PaymentConfig' ).info ("hive_setting.HIVE_PAYMENT_CONFIG: " + hive_setting .PAYMENT_PATH )
22
+ logging .getLogger ('v1 PaymentConfig' ).info ("hive_setting.HIVE_PAYMENT_CONFIG: " + hive_setting .PAYMENT_CONFIG_PATH )
23
23
with open (path , 'r' )as fp :
24
24
json_data = json .load (fp )
25
25
PaymentConfig .config_info = json_data
26
- logging .getLogger ("Hive Payment" ).info ("Load payment config file:" + hive_setting .PAYMENT_PATH )
26
+ logging .getLogger ("Hive Payment" ).info ("Load payment config file:" + hive_setting .PAYMENT_CONFIG_PATH )
27
27
28
28
@staticmethod
29
29
def get_all_package_info ():
Original file line number Diff line number Diff line change @@ -40,10 +40,10 @@ def before_request():
40
40
if request .method == "OPTIONS" :
41
41
# return None to let CORS handle OPTIONS
42
42
return
43
- # elif request.method == '""OPTIONS':
44
- # # for hive js demo local connecting, its maybe ionic bug
45
- # request.method = 'OPTIONS'
46
- # return '{}'
43
+ elif request .method == '""OPTIONS' :
44
+ # for hive js demo local connecting, its maybe ionic bug
45
+ request .method = 'OPTIONS'
46
+ return '{}'
47
47
48
48
# Sets the "wsgi.input_terminated" environment flag, thus enabling
49
49
# Werkzeug to pass chunked requests as streams; this makes the API
Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ def to_get_orders(self):
140
140
141
141
class OrderManager :
142
142
def __init__ (self ):
143
- self .ela_address = hive_setting .PAYMENT_ADDRESS
143
+ self .ela_address = hive_setting .PAYMENT_RECEIVING_ADDRESS
144
144
self .mcli = MongodbClient ()
145
145
self .vault_manager = VaultManager ()
146
146
self .backup_manager = BackupManager ()
Original file line number Diff line number Diff line change 22
22
23
23
class Payment (metaclass = Singleton ):
24
24
def __init__ (self ):
25
- self .ela_address = hive_setting .PAYMENT_ADDRESS
25
+ self .ela_address = hive_setting .PAYMENT_RECEIVING_ADDRESS
26
26
self .auth = Auth ()
27
27
self .vault_subscription = None
28
28
self .vault_manager = VaultManager ()
Original file line number Diff line number Diff line change @@ -90,8 +90,8 @@ def PAYMENT_ENABLED(self):
90
90
return self .env_config ('PAYMENT_ENABLED' , default = 'True' , cast = bool )
91
91
92
92
@property
93
- def PAYMENT_PATH (self ):
94
- path = self .env_config ('PAYMENT_PATH ' , default = './payment_config.json' , cast = str )
93
+ def PAYMENT_CONFIG_PATH (self ):
94
+ path = self .env_config ('PAYMENT_CONFIG_PATH ' , default = './payment_config.json' , cast = str )
95
95
if path .startswith ('/' ):
96
96
return path
97
97
return os .path .join (BASE_DIR , path )
@@ -105,8 +105,8 @@ def PAYMENT_CONTRACT_ADDRESS(self):
105
105
return self .env_config ('PAYMENT_CONTRACT_ADDRESS' , default = '' , cast = str )
106
106
107
107
@property
108
- def PAYMENT_ADDRESS (self ):
109
- return self .env_config ('PAYMENT_ADDRESS ' , default = 'EN9YK69ScA6WFgVQW3UZcmSRLSCStaU2pQ' , cast = str )
108
+ def PAYMENT_RECEIVING_ADDRESS (self ):
109
+ return self .env_config ('PAYMENT_RECEIVING_ADDRESS ' , default = 'EN9YK69ScA6WFgVQW3UZcmSRLSCStaU2pQ' , cast = str )
110
110
111
111
@property
112
112
def ATLAS_ENABLED (self ):
Original file line number Diff line number Diff line change @@ -11,15 +11,15 @@ class PaymentConfig:
11
11
12
12
@staticmethod
13
13
def init_config ():
14
- config_file = Path (hive_setting .PAYMENT_PATH )
14
+ config_file = Path (hive_setting .PAYMENT_CONFIG_PATH )
15
15
if not config_file .exists ():
16
16
logging .getLogger ('PaymentConfig' ).info ("hive_setting.HIVE_PAYMENT_CONFIG dose not exist" )
17
17
else :
18
- logging .getLogger ('PaymentConfig' ).info ("hive_setting.HIVE_PAYMENT_CONFIG: " + hive_setting .PAYMENT_PATH )
19
- with open (hive_setting .PAYMENT_PATH , 'r' )as fp :
18
+ logging .getLogger ('PaymentConfig' ).info ("hive_setting.HIVE_PAYMENT_CONFIG: " + hive_setting .PAYMENT_CONFIG_PATH )
19
+ with open (hive_setting .PAYMENT_CONFIG_PATH , 'r' )as fp :
20
20
json_data = json .load (fp )
21
21
PaymentConfig .config_info = json_data
22
- logging .getLogger ("PaymentConfig" ).info ("Load payment config file:" + hive_setting .PAYMENT_PATH )
22
+ logging .getLogger ("PaymentConfig" ).info ("Load payment config file:" + hive_setting .PAYMENT_CONFIG_PATH )
23
23
24
24
@staticmethod
25
25
def get_all_package_info ():
You can’t perform that action at this time.
0 commit comments