feat: make blockchain JSON RPC configurable from settings (#494)

* feat: make blockchain JSON RPC configurable from settings

* chore: expose the settings directly

* feat: restart bee node when blockchain RPC changes, add notification and error logging
This commit is contained in:
Vojtech Simetka
2022-07-27 08:45:03 +02:00
committed by GitHub
parent f82444f212
commit 408b565935
10 changed files with 126 additions and 78 deletions
+2 -2
View File
@@ -6,8 +6,8 @@ export function getJson<T extends Record<string, any>>(url: string): Promise<T>
return sendRequest(url, 'GET') as Promise<T>
}
export function postJson(url: string, data?: Record<string, any>): Promise<Record<string, unknown>> {
return sendRequest(url, 'POST', data)
export function postJson<T extends Record<string, any>>(url: string, data?: T): Promise<T> {
return sendRequest(url, 'POST', data) as Promise<T>
}
export async function sendRequest(