Compare commits
No commits in common. "005a306fc63d89232cf092decd9ed838e1d7f803" and "5685830cba57d7ff8f64ec5c6d581b44cb378b98" have entirely different histories.
005a306fc6
...
5685830cba
@ -23,6 +23,5 @@
|
|||||||
"TON": "Toncoin (TON)",
|
"TON": "Toncoin (TON)",
|
||||||
"OP": "Optimism (OP)",
|
"OP": "Optimism (OP)",
|
||||||
"IAA": "IRIS (IAA)",
|
"IAA": "IRIS (IAA)",
|
||||||
"NEAR": "NEAR Protocol (NEAR)",
|
"NEAR": "NEAR Protocol (NEAR)"
|
||||||
"KAS": "Kasper (KAS)"
|
|
||||||
}
|
}
|
@ -1 +0,0 @@
|
|||||||
kaspa:qzl7av7gq5j594pcs2gn6zf2xadpmhdm90nygjstvte0n6gt9f4fgx0w2dhm8
|
|
35
addCoin.py
35
addCoin.py
@ -1,35 +0,0 @@
|
|||||||
import os
|
|
||||||
import json
|
|
||||||
|
|
||||||
if not os.path.exists('.well-known/wallets'):
|
|
||||||
os.makedirs('.well-known/wallets')
|
|
||||||
|
|
||||||
def addCoin(token:str, name:str, address:str):
|
|
||||||
with open('.well-known/wallets/'+token.upper(),'w') as f:
|
|
||||||
f.write(address)
|
|
||||||
|
|
||||||
with open('.well-known/wallets/.coins','r') as f:
|
|
||||||
coins = json.load(f)
|
|
||||||
|
|
||||||
coins[token.upper()] = f'{name} ({token.upper()})'
|
|
||||||
with open('.well-known/wallets/.coins','w') as f:
|
|
||||||
f.write(json.dumps(coins, indent=4))
|
|
||||||
|
|
||||||
def addDomain(token:str, domain:str):
|
|
||||||
with open('.well-known/wallets/.domains','r') as f:
|
|
||||||
domains = json.load(f)
|
|
||||||
|
|
||||||
domains[token.upper()] = domain
|
|
||||||
with open('.well-known/wallets/.domains','w') as f:
|
|
||||||
f.write(json.dumps(domains, indent=4))
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
# Ask user for token
|
|
||||||
token = input('Enter token symbol: ')
|
|
||||||
name = input('Enter token name: ')
|
|
||||||
address = input('Enter wallet address: ')
|
|
||||||
addCoin(token, name, address)
|
|
||||||
|
|
||||||
if input('Do you want to add a domain? (y/n): ').lower() == 'y':
|
|
||||||
domain = input('Enter domain: ')
|
|
||||||
addDomain(token, domain)
|
|
@ -144,10 +144,8 @@ def manifest():
|
|||||||
# Read as json
|
# Read as json
|
||||||
with open('templates/manifest.json') as file:
|
with open('templates/manifest.json') as file:
|
||||||
manifest = json.load(file)
|
manifest = json.load(file)
|
||||||
if host != 'localhost:5000' and host != '127.0.0.1:5000':
|
scheme = request.scheme
|
||||||
manifest['start_url'] = f'https://{host}/'
|
manifest['start_url'] = f'{scheme}://{host}/'
|
||||||
else:
|
|
||||||
manifest['start_url'] = 'http://127.0.0.1:5000/'
|
|
||||||
return jsonify(manifest)
|
return jsonify(manifest)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user