Skip to content

Commit 2e7f82a

Browse files
committed
Update snapshots
1 parent efa003a commit 2e7f82a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

packages/preset-lumberjack/src/generators/preset/__snapshots__/generator.spec.ts.snap

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ exports[`preset generator should run successfully 1`] = `
278278
"Anchor.toml": {
279279
"path": "./program/Anchor.toml",
280280
"isBinary": false,
281-
"content": "[features]\\nseeds = false\\n[programs.localnet]\\nlumberjack = \\"MkabCfyUD6rBTaYHpgKBBpBo5qzWA2pK2hrGGKMurJt\\"\\n\\n[registry]\\nurl = \\"https://anchor.projectserum.com\\"\\n\\n[provider]\\ncluster = \\"devnet\\"\\nwallet = \\"/Users/jonasmac2/.config/solana/id.json\\"\\n\\n[scripts]\\ntest = \\"yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts\\"\\n"
281+
"content": "[features]\\nseeds = false\\n[programs.localnet]\\nlumberjack = \\"MkabCfyUD6rBTaYHpgKBBpBo5qzWA2pK2hrGGKMurJt\\"\\n\\n[registry]\\nurl = \\"https://anchor.projectserum.com\\"\\n\\n[provider]\\ncluster = \\"devnet\\"\\nwallet = \\"~/.config/solana/id.json\\"\\n\\n[scripts]\\ntest = \\"yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts\\"\\n"
282282
},
283283
"Cargo.lock": {
284284
"path": "./program/Cargo.lock",
@@ -670,13 +670,13 @@ exports[`preset generator should run successfully 1`] = `
670670
"isBinary": true,
671671
"content": null
672672
},
673-
"Header.jpg.meta": {
674-
"path": "./unity/Lumberjack/Assets/DOTween 4/Editor/Imgs/Header.jpg.meta",
673+
"Header.jpg": {
674+
"path": "./unity/Lumberjack/Assets/DOTween 4/Editor/Imgs/Header.jpg",
675675
"isBinary": true,
676676
"content": null
677677
},
678-
"Header.jpg": {
679-
"path": "./unity/Lumberjack/Assets/DOTween 4/Editor/Imgs/Header.jpg",
678+
"Header.jpg.meta": {
679+
"path": "./unity/Lumberjack/Assets/DOTween 4/Editor/Imgs/Header.jpg.meta",
680680
"isBinary": true,
681681
"content": null
682682
}
@@ -1223,7 +1223,7 @@ exports[`preset generator should run successfully 1`] = `
12231223
"TokenPanel.cs": {
12241224
"path": "./unity/Lumberjack/Assets/Game/Scripts/Ui/TokenPanel.cs",
12251225
"isBinary": false,
1226-
"content": "using Frictionless;\\nusing Solana.Unity.Programs;\\nusing Solana.Unity.Rpc.Types;\\nusing Solana.Unity.SDK;\\nusing Solana.Unity.Wallet;\\nusing TMPro;\\nusing UnityEngine;\\n\\nnamespace Game.Scripts.Ui\\n{\\n /// <summary>\\n /// Shows the amount of the token \\"TokenMintAddress\\" from the connected Wallet.\\n /// </summary>\\n public class TokenPanel : MonoBehaviour\\n {\\n public TextMeshProUGUI TokenAmount;\\n\\n public string\\n TokenMintAdress =\\n \\"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\\"; // Replace with whatever token you like. (Default USDC)\\n\\n private PublicKey _associatedTokenAddress;\\n \\n void Awake()\\n {\\n Web3.OnLogin += onLogin;\\n UpdateAndSubscribeToTokenAccount();\\n }\\n \\n void OnDestroy()\\n {\\n Web3.OnLogin -= onLogin;\\n }\\n\\n private void onLogin(Account account)\\n {\\n UpdateAndSubscribeToTokenAccount();\\n }\\n\\n private async void UpdateAndSubscribeToTokenAccount()\\n {\\n if (Web3.Instance.WalletBase.Account == null)\\n {\\n return;\\n }\\n \\n var wallet = Web3.Instance.WalletBase;\\n\\n if (wallet != null && wallet.Account.PublicKey != null)\\n {\\n _associatedTokenAddress =\\n AssociatedTokenAccountProgram.DeriveAssociatedTokenAccount(wallet.Account.PublicKey, new PublicKey(TokenMintAdress));\\n }\\n \\n if (_associatedTokenAddress == null)\\n {\\n return;\\n }\\n\\n await Web3.WsRpc.SubscribeTokenAccountAsync(_associatedTokenAddress, (state, value) =>\\n {\\n TokenAmount.text = value.Value.Data.Parsed.Info.TokenAmount.UiAmountString;\\n Debug.Log(\\"Token balance (Socket Token): \\" + value.Value.Data.Parsed.Info.TokenAmount.UiAmountString);\\n }, Commitment.Confirmed);\\n \\n var tokenBalance = await wallet.ActiveRpcClient.GetTokenAccountBalanceAsync(_associatedTokenAddress, Commitment.Confirmed);\\n if (tokenBalance.Result == null || tokenBalance.Result.Value == null)\\n {\\n TokenAmount.text = \\"0\\";\\n return;\\n }\\n TokenAmount.text = tokenBalance.Result.Value.UiAmountString;\\n }\\n }\\n}"
1226+
"content": "using Frictionless;\\nusing Solana.Unity.Programs;\\nusing Solana.Unity.Rpc.Types;\\nusing Solana.Unity.SDK;\\nusing Solana.Unity.Wallet;\\nusing TMPro;\\nusing UnityEngine;\\n\\nnamespace Game.Scripts.Ui\\n{\\n /// <summary>\\n /// Shows the amount of the token \\"TokenMintAddress\\" from the connected Wallet.\\n /// </summary>\\n public class TokenPanel : MonoBehaviour\\n {\\n public TextMeshProUGUI TokenAmount;\\n\\n public string\\n TokenMintAdress =\\n \\"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\\"; // Replace with whatever token you like. (Default USDC)\\n\\n private PublicKey _associatedTokenAddress;\\n \\n void Awake()\\n {\\n Web3.OnLogin += onLogin;\\n UpdateAndSubscribeToTokenAccount();\\n }\\n \\n void OnDestroy()\\n {\\n Web3.OnLogin -= onLogin;\\n }\\n\\n private void onLogin(Account account)\\n {\\n UpdateAndSubscribeToTokenAccount();\\n }\\n\\n private async void UpdateAndSubscribeToTokenAccount()\\n {\\n if (Web3.Instance == null || Web3.Instance.WalletBase.Account == null)\\n {\\n return;\\n }\\n \\n var wallet = Web3.Instance.WalletBase;\\n\\n if (wallet != null && wallet.Account.PublicKey != null)\\n {\\n _associatedTokenAddress =\\n AssociatedTokenAccountProgram.DeriveAssociatedTokenAccount(wallet.Account.PublicKey, new PublicKey(TokenMintAdress));\\n }\\n \\n if (_associatedTokenAddress == null)\\n {\\n return;\\n }\\n\\n await Web3.WsRpc.SubscribeTokenAccountAsync(_associatedTokenAddress, (state, value) =>\\n {\\n TokenAmount.text = value.Value.Data.Parsed.Info.TokenAmount.UiAmountString;\\n Debug.Log(\\"Token balance (Socket Token): \\" + value.Value.Data.Parsed.Info.TokenAmount.UiAmountString);\\n }, Commitment.Confirmed);\\n \\n var tokenBalance = await wallet.ActiveRpcClient.GetTokenAccountBalanceAsync(_associatedTokenAddress, Commitment.Confirmed);\\n if (tokenBalance.Result == null || tokenBalance.Result.Value == null)\\n {\\n TokenAmount.text = \\"0\\";\\n return;\\n }\\n TokenAmount.text = tokenBalance.Result.Value.UiAmountString;\\n }\\n }\\n}"
12271227
},
12281228
"UiService.cs.meta": {
12291229
"path": "./unity/Lumberjack/Assets/Game/Scripts/Ui/UiService.cs.meta",

0 commit comments

Comments
 (0)