fix(gen1): isolate NexRent treasury wallet and use comma-separated immutable bindings
This commit is contained in:
1 parent
a12941aca4
commit
0ff4a675de
1 file changed
+6
-2
@@ -226,7 +226,7 @@ namespace NexVerse.RegionModules.Economy
|
||||
throw new InvalidOperationException("NexRent Treasury requires a pre-provisioned wallet, HTTPS api.php URL and strong secret.");
|
||||
}
|
||||
foreach (string entry in economy.GetString("NexRentTreasuryBoxBindings", "")
|
||||
.Split(';', StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries))
|
||||
.Split(',', StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries))
|
||||
{
|
||||
string[] ids = entry.Split('|', StringSplitOptions.TrimEntries);
|
||||
if (ids.Length != 2 || !UUID.TryParse(ids[0], out UUID objectId)
|
||||
@@ -234,7 +234,7 @@ namespace NexVerse.RegionModules.Economy
|
||||
|| objectId.IsZero() || ownerId.IsZero()
|
||||
|| !m_NexRentTreasuryBindings.TryAdd(objectId, ownerId))
|
||||
{
|
||||
throw new InvalidOperationException("NexRentTreasuryBoxBindings must be unique objectUUID|ownerUUID pairs separated by semicolons.");
|
||||
throw new InvalidOperationException("NexRentTreasuryBoxBindings must be unique objectUUID|ownerUUID pairs separated by commas.");
|
||||
}
|
||||
}
|
||||
if (m_NexRentTreasuryBindings.Count == 0)
|
||||
@@ -283,6 +283,10 @@ namespace NexVerse.RegionModules.Economy
|
||||
"[NEX-ECONOMY-VIEWER]: FeeWalletId must be a UUID.");
|
||||
}
|
||||
|
||||
if (m_NexRentTreasuryEnabled && m_NexRentTreasuryWallet == m_FeeWalletId
|
||||
&& !m_FeeWalletId.IsZero())
|
||||
throw new InvalidOperationException("NexRent Treasury wallet must be separate from the fee wallet.");
|
||||
|
||||
if (m_FeeWalletId.IsZero())
|
||||
{
|
||||
m_Log.Warn("[NEX-ECONOMY-VIEWER]: FeeWalletId fehlt. " +
|
||||
|
||||
Reference in new issue
Block a user