这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5014,6 +5014,7 @@ MonoBehaviour:
- {fileID: 1253856405580558448}
- {fileID: 6789953013710888595}
- {fileID: 8115748193872107302}
- {fileID: 1136090464794109220}
displayLineObjects:
- {fileID: 3146313566770778794}
- {fileID: 3922797289987004089}
Expand Down Expand Up @@ -11112,8 +11113,8 @@ MonoBehaviour:
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4286381996
m_fontColor: {r: 0.6745098, g: 1, b: 0.4862745, a: 1}
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ private async void SetTokens()
customTokenContract = data[0];
customTokenSymbolText.text = data[1].ToUpper();
var balance = await Web3Accessor.Web3.Erc20.GetBalanceOf(customTokenContract, Web3Accessor.Web3.Signer.PublicAddress);
var customTokenValue = balance / BigInteger.Pow(10, 18);
customTokenAmountText.text = customTokenValue.ToString();
var customTokenValue = (decimal)balance / (decimal)BigInteger.Pow(10, 18);
customTokenAmountText.text = customTokenValue.ToString("N18");
customTokenDisplay.SetActive(true);
}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ private void OnTransactionRequested(TransactionRequested transactionRequested)

PromptTransactionRequest();
}


/// <summary>
/// Prompts transaction request display.
/// </summary>
private void PromptTransactionRequest()
{
TransactionRequested transactionRequested = _transactionQueue.Peek();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,12 @@ public Task<TransactionResponse> SendTransaction(TransactionRequest transaction)

var request = new TransactionRequested(id, transaction);

transactionHandler.RequestTransaction(request);

var tcs = new TaskCompletionSource<TransactionResponse>();

_transactionPool.Add(request, tcs);

transactionHandler.RequestTransaction(request);

return tcs.Task;
}

Expand Down
2 changes: 1 addition & 1 deletion Packages/io.chainsafe.web3-unity/Editor/ServerSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public void UpdateServerMenuInfo()
selectedRpcIndex = Mathf.Clamp(selectedRpcIndex, 0, chainList[selectedChainIndex].rpc.Count - 1);
// Set the rpc
rpc = chainList[selectedChainIndex].rpc[selectedRpcIndex];
blockExplorerUrl = chainList[selectedChainIndex].blockExplorerUrl;
blockExplorerUrl = chainList[selectedChainIndex].explorers[0].url;
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ public struct NativeCurrency
{
public string symbol { get; set; }
}

public struct Explorer
{
public string name { get; set; }
public string url { get; set; }
public string standard { get; set; }
}

public struct Root
{
Expand All @@ -14,6 +21,6 @@ public struct Root
public List<string> rpc { get; set; }
public NativeCurrency nativeCurrency { get; set; }
public object chainId { get; set; }
public string blockExplorerUrl { get; set; }
public List<Explorer> explorers { get; set; }
}
}