Skip to content
This repository was archived by the owner on May 16, 2019. It is now read-only.

Commit 98e3fb6

Browse files
committed
Remove server url from settings
1 parent 1f8cc05 commit 98e3fb6

2 files changed

Lines changed: 10 additions & 12 deletions

File tree

api/restapi.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,6 @@ def set_settings(self, request):
681681
request.args["libbitcoin_server"][0],
682682
1 if str_to_bool(request.args["ssl"][0]) else 0,
683683
KeyChain(self.db).guid_privkey.encode("hex"),
684-
request.args["server_url"][0],
685684
request.args["terms_conditions"][0],
686685
request.args["refund_policy"][0]
687686
)
@@ -717,9 +716,8 @@ def get_settings(self, request):
717716
"libbitcoin_server": settings[14],
718717
"ssl": True if settings[15] == 1 else False,
719718
"seed": settings[16],
720-
"server_url": settings[17],
721-
"terms_conditions": settings[18],
722-
"refund_policy": settings[19]
719+
"terms_conditions": settings[17],
720+
"refund_policy": settings[18]
723721
}
724722
request.write(json.dumps(settings_json, indent=4))
725723
request.finish()

db/datastore.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def create_database(filepath=None):
6666
cursor.execute('''CREATE TABLE settings(id INTEGER PRIMARY KEY, refundAddress TEXT, currencyCode TEXT,
6767
country TEXT, language TEXT, timeZone TEXT, notifications INTEGER, shipToName TEXT, shipToStreet TEXT,
6868
shipToCity TEXT, shipToState TEXT, shipToPostalCode TEXT, shipToCountry TEXT, blocked BLOB, libbitcoinServer TEXT,
69-
SSL INTEGER, seed TEXT, server TEXT, terms_conditions TEXT, refund_policy TEXT)''')
69+
SSL INTEGER, seed TEXT, terms_conditions TEXT, refund_policy TEXT)''')
7070
db.commit()
7171
return db
7272

@@ -555,17 +555,17 @@ def __init__(self):
555555

556556
def update(self, refundAddress, currencyCode, country, language, timeZone, notifications, shipToName,
557557
shipToStreet, shipToCity, shipToState, shipToPostalCode, shipToCountry, blocked,
558-
libbitcoinServer, ssl, seed, server, terms_conditions, refund_policy):
558+
libbitcoinServer, ssl, seed, terms_conditions, refund_policy):
559559
cursor = self.db.cursor()
560560
try:
561561
cursor.execute('''INSERT OR REPLACE INTO settings(id, refundAddress, currencyCode, country,
562562
language, timeZone, notifications, shipToName, shipToStreet, shipToCity, shipToState, shipToPostalCode, shipToCountry,
563-
blocked, libbitcoinServer, ssl, seed, server, terms_conditions, refund_policy)
564-
VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)''', (1, refundAddress, currencyCode, country, language, timeZone,
565-
notifications, shipToName, shipToStreet, shipToCity,
566-
shipToState, shipToPostalCode, shipToCountry, blocked,
567-
libbitcoinServer, ssl, seed, server, terms_conditions,
568-
refund_policy))
563+
blocked, libbitcoinServer, ssl, seed, terms_conditions, refund_policy)
564+
VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)''', (1, refundAddress, currencyCode, country, language, timeZone,
565+
notifications, shipToName, shipToStreet, shipToCity,
566+
shipToState, shipToPostalCode, shipToCountry, blocked,
567+
libbitcoinServer, ssl, seed, terms_conditions,
568+
refund_policy))
569569
except Exception as e:
570570
print e.message
571571
self.db.commit()

0 commit comments

Comments
 (0)