diff --git a/bindings/delivery.go b/bindings/delivery.go index 2cdb16b9411f606584921da5d710078cf0887953..6420196d4e16f34edae4510cb7d1d228f7e0b2d2 100644 --- a/bindings/delivery.go +++ b/bindings/delivery.go @@ -20,7 +20,20 @@ import ( // dashboardBaseURL is the base of the xx network's round dashboard URL. // This should be used by any type of send report's GetRoundURL method. -const dashboardBaseURL = "https://dashboard.xx.network" +var dashboardBaseURL = "https://dashboard.xx.network" + +// SetDashboardURL is a function which modifies the base dashboard URL +// that is returned as part of any send report. Internally, this is defaulted +// to "https://dashboard.xx.network". This should only be called if the user +// explicitly wants to modify the dashboard URL. This function is not +// thread-safe, and as such should only be called on setup. +// +// Parameters: +// - newURL - A valid URL that will be used for round look up on any send +// report. +func SetDashboardURL(newURL string) { + dashboardBaseURL = newURL +} // getRoundURL is a helper function which returns the specific round // within any type of send report, if they have a round in their RoundsList.