github.com/keybase/client/go@v0.0.0-20240309051027-028f7c731f8b/libkb/stellar_stub.go (about) 1 package libkb 2 3 import ( 4 "context" 5 "errors" 6 "fmt" 7 8 "github.com/keybase/client/go/gregor" 9 "github.com/keybase/client/go/protocol/chat1" 10 stellar1 "github.com/keybase/client/go/protocol/stellar1" 11 ) 12 13 type nullStellar struct { 14 Contextified 15 } 16 17 var _ Stellar = (*nullStellar)(nil) 18 19 func newNullStellar(g *GlobalContext) *nullStellar { 20 return &nullStellar{NewContextified(g)} 21 } 22 23 func (n *nullStellar) CreateWalletSoft(ctx context.Context) { 24 n.G().Log.CErrorf(ctx, "null stellar impl") 25 } 26 27 func (n *nullStellar) Upkeep(ctx context.Context) error { 28 return fmt.Errorf("null stellar impl") 29 } 30 31 func (n *nullStellar) GetServerDefinitions(ctx context.Context) (ret stellar1.StellarServerDefinitions, err error) { 32 return ret, fmt.Errorf("null stellar impl") 33 } 34 35 func (n *nullStellar) KickAutoClaimRunner(MetaContext, gregor.MsgID) {} 36 37 func (n *nullStellar) UpdateUnreadCount(context.Context, stellar1.AccountID, int) error { 38 return errors.New("nullStellar UpdateUnreadCount") 39 } 40 41 func (n *nullStellar) SendMiniChatPayments(mctx MetaContext, convID chat1.ConversationID, payments []MiniChatPayment) ([]MiniChatPaymentResult, error) { 42 return nil, errors.New("nullStellar SendMiniChatPayments") 43 } 44 45 func (n *nullStellar) SpecMiniChatPayments(mctx MetaContext, payments []MiniChatPayment) (*MiniChatPaymentSummary, error) { 46 return nil, errors.New("nullStellar SpecMiniChatPayments") 47 } 48 49 func (n *nullStellar) HandleOobm(context.Context, gregor.OutOfBandMessage) (bool, error) { 50 return false, errors.New("nullStellar HandleOobm") 51 } 52 53 func (n *nullStellar) RemovePendingTx(MetaContext, stellar1.AccountID, stellar1.TransactionID) error { 54 return errors.New("nullStellar RemovePendingTx") 55 } 56 57 func (n *nullStellar) KnownCurrencyCodeInstant(context.Context, string) (bool, bool) { 58 return false, false 59 } 60 61 func (n *nullStellar) InformBundle(MetaContext, stellar1.BundleRevision, []stellar1.BundleEntry) {} 62 63 func (n *nullStellar) InformDefaultCurrencyChange(MetaContext) {} 64 65 func (n *nullStellar) Refresh(MetaContext, string) {}