@@ -6,7 +6,14 @@ import { MsgDelegate } from "cosmjs-types/cosmos/staking/v1beta1/tx";
66import { QueryClient } from "../../queryclient" ;
77import { SigningStargateClient } from "../../signingstargateclient" ;
88import { assertIsDeliverTxSuccess } from "../../stargateclient" ;
9- import { defaultSigningClientOptions , faucet , simapp , simappEnabled , validator } from "../../testutils" ;
9+ import {
10+ defaultSigningClientOptions ,
11+ externalCommunityPool ,
12+ faucet ,
13+ simapp ,
14+ simappEnabled ,
15+ validator ,
16+ } from "../../testutils" ;
1017import { MsgDelegateEncodeObject } from "../" ;
1118import { DistributionExtension , setupDistributionExtension } from "./queries" ;
1219
@@ -51,9 +58,15 @@ async function makeClientWithDistribution(
5158 it ( "works" , async ( ) => {
5259 const [ client , cometClient ] = await makeClientWithDistribution ( simapp . tendermintUrlHttp ) ;
5360
54- const response = await client . distribution . communityPool ( ) ;
55- expect ( response . pool ) . toBeDefined ( ) ;
56- expect ( response . pool ) . not . toBeNull ( ) ;
61+ if ( externalCommunityPool ) {
62+ await expectAsync ( client . distribution . communityPool ( ) ) . toBeRejectedWithError (
63+ / e x t e r n a l c o m m u n i t y p o o l i s e n a b l e d - u s e t h e C o m m u n i t y P o o l q u e r y e x p o s e d b y t h e e x t e r n a l c o m m u n i t y p o o l / i,
64+ ) ;
65+ } else {
66+ const response = await client . distribution . communityPool ( ) ;
67+ expect ( response . pool ) . toBeDefined ( ) ;
68+ expect ( response . pool ) . not . toBeNull ( ) ;
69+ }
5770
5871 cometClient . disconnect ( ) ;
5972 } ) ;
0 commit comments